Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6235933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:45:35+00:00 2026-05-24T10:45:35+00:00

Have anyone stumbled upon a problem where NHibernate is extremely slow in Visual Studio

  • 0

Have anyone stumbled upon a problem where NHibernate is extremely slow in Visual Studio while debugging, but behaves normally when run separately? Logging is disabled and the time lost seems to be when the actual queries are executed, NHProfiler shows that queries were executed very quickly (on SQL side I presume), but each session with 10 queries takes about 4 seconds. I am using SQL Express Server. As I said, even if I turn on full logging and run my application without Visual Studio it is a magnitude faster.

Update. After hours and hours of work towards the issue I was able to fix it by simply switching project type from Windows Application to Console Application (although in reality it’s a Windows Service, but it always worked before with Windows Application project type). What could possibly be the difference to bring NHibernate to a halt in debugging mode?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:45:35+00:00Added an answer on May 24, 2026 at 10:45 am

    I was having the same problem with my WinForms app. I tried your suggestion of changing it to a console application and it worked! unfortunately having the console window wasn’t acceptable.

    I then found the underlying culprit I think. ShowSql() (or show_sql=true). Turning this off made the application just as fast as when run from outside Visual Studio. I assume this is because when run from VS it redirects console output to the output window and all this takes time. When run outside of Visual Studio there is no console output to write to so it’s faster.

    Hope that works for you also

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Someone at my company stumbled upon logfaces . Does anyone have any experience with
I have stumbled upon a problem when creating a program of mine. I have
So I made my own carousel control in WPF. I have stumbled upon a
I'm revisiting som old code of mine and have stumbled upon a method for
I have once stumbled upon an open source project that implements the Google Chrome
I just stumbled upon a change that seems to have counterintuitive performance ramifications. Can
I stumbled upon an ugly problem the other day: I'm using XML strings to
I have stumbled upon a riddle which I can't explain, maybe someone here will
Have anyone successfully managed to setup a combined Java/C++ project for Eclipse? What I
Does anyone have any recommendations of tools that can be of assistance with moving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.