debug mode faster than bin\exe ?

C

corey.hutchinson

I have an application that when I run it in VS 2005 debug mode it
operates faster (10 fold) than when I execute the exe directly from
the bin directory. The one operation in particular in which the
performance differs so greatly is when the app makes a call to another
service and inserts the return data into a SQL server. I have
verified there is nothing shady going on in the SQL server. This is
also not a new problem I have been working it for 2 weeks, I have
tried rebooting, testing during all times of the day, different
machines, etc ... I almost want to say there are different assemblies
being loaded but I can't tell that for sure.
I have no idea how to continue troubleshooting such a case. Does
anyone have any ideas or know of any tools that may help me?

Thanks
Hutch
 
L

Lloyd Sheen

I have an application that when I run it in VS 2005 debug mode it
operates faster (10 fold) than when I execute the exe directly from
the bin directory. The one operation in particular in which the
performance differs so greatly is when the app makes a call to another
service and inserts the return data into a SQL server. I have
verified there is nothing shady going on in the SQL server. This is
also not a new problem I have been working it for 2 weeks, I have
tried rebooting, testing during all times of the day, different
machines, etc ... I almost want to say there are different assemblies
being loaded but I can't tell that for sure.
I have no idea how to continue troubleshooting such a case. Does
anyone have any ideas or know of any tools that may help me?

Thanks
Hutch

Is your first execution within VS slower than the subsequent executions??

If that is the case then you are running into connection caching in SQL
Server. The first time you execute in VS it will create a new connection.
There is a possiblity after that the app (since it is running as a process
within VS will pick up the same connection). When you run the app it has to
create the connection so it will take longer. No sure why it is so long but
that is one avenue to look into.

If you use the event logs for debugging you can log the time at the start of
the connection and then after the connection is made. If possible in your
app if you put another connection open just for debugging and then see if it
happens quickly.

Hope this helps.

Lloyd Sheen
 
C

corey.hutchinson

Is your first execution within VS slower than the subsequent executions??

If that is the case then you are running into connection caching in SQL
Server. The first time you execute in VS it will create a new connection.
There is a possiblity after that the app (since it is running as a process
within VS will pick up the same connection). When you run the app it has to
create the connection so it will take longer. No sure why it is so long but
that is one avenue to look into.

If you use the event logs for debugging you can log the time at the start of
the connection and then after the connection is made. If possible in your
app if you put another connection open just for debugging and then see if it
happens quickly.

Hope this helps.

Lloyd Sheen- Hide quoted text -

- Show quoted text -



Someone else had suggested running it multiple times to see if the
timing is affected. Unfortunately, executing the bin application or
Debug mode multiple times in row did not affect performance. I also
noticed yesterday that if I unchecked the [Enable the Visual Studio
Hosting Process] (in the properties of the project | debug tab) The
performance through debug mode degraded to the same slow speed as the
Bin application. Is this option a clue as to what's going on ?

Thanks

Hutch
 
C

corey.hutchinson

Is your first execution within VS slower than the subsequent executions??
If that is the case then you are running into connection caching in SQL
Server. The first time you execute in VS it will create a new connection.
There is a possiblity after that the app (since it is running as a process
within VS will pick up the same connection). When you run the app it has to
create the connection so it will take longer. No sure why it is so long but
that is one avenue to look into.
If you use the event logs for debugging you can log the time at the start of
the connection and then after the connection is made. If possible in your
app if you put another connection open just for debugging and then see if it
happens quickly.
Hope this helps.
Lloyd Sheen- Hide quoted text -
- Show quoted text -

Someone else had suggested running it multiple times to see if the
timing is affected. Unfortunately, executing the bin application or
Debug mode multiple times in row did not affect performance. I also
noticed yesterday that if I unchecked the [Enable the Visual Studio
Hosting Process] (in the properties of the project | debug tab) The
performance through debug mode degraded to the same slow speed as the
Bin application. Is this option a clue as to what's going on ?

Thanks

Hutch- Hide quoted text -

- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top