473,659 Members | 3,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

debug mode faster than bin\exe ?

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

Apr 30 '07 #1
3 2407

<co************ **@gmail.comwro te in message
news:11******** **************@ u30g2000hsc.goo glegroups.com.. .
>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

Apr 30 '07 #2
On Apr 30, 3:18 pm, "Lloyd Sheen" <a...@b.cwrot e:
<corey.hutchin. ..@gmail.comwro te in message

news:11******** **************@ u30g2000hsc.goo glegroups.com.. .


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- 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

May 1 '07 #3
On May 1, 8:17 am, corey.hutchin.. .@gmail.com wrote:
On Apr 30, 3:18 pm, "Lloyd Sheen" <a...@b.cwrot e:


<corey.hutchin. ..@gmail.comwro te in message
news:11******** **************@ u30g2000hsc.goo glegroups.com.. .
>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- 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 -

May 2 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1463
by: Simon Burton | last post by:
Hi, I'm after a no-op command, so that i can redirect logging commands in performance critical code. Something like this: def log(*args): print args def null_log(*args): pass if not DEBUG: log = null_log
2
5171
by: JezB | last post by:
Any way I can programatically test whether my (c#) code is running in Debug or Release mode ? I want to load a smaller dataset when running in debug, for testing purposes.
7
2902
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by using the following code in Page_Load event handler. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim intcount As Integer intcount = 0 For intcount = 0 To 4
2
2301
by: Chris Pielak | last post by:
Hi. I'm about to try deploying my ASP.NET application, written with the 1.1 Framework. I'm coming across something odd when compiling in Debug and Release mode. When compiling in Debug mode, I am able to run the application smoothly and get things done in my application. However, when I switch to Release mode, and try saving data back to my database (through Remoting) the following exception is thrown:
6
2349
by: Rene | last post by:
Is there a way to tell if an assembly was compiled on Debug or Release mode? I tried viewing the file usin Ildasm but did't notice any special comment line or something that would tell me if it was Debugged or Released. Thanks.
3
4028
by: Haldun ALIML | last post by:
Suppose that you have below property in some class, #if DEBUG public string DebugInfo { get { return "INDEX : " + _name + "\n" + "Index Owner : " + _owner.Name + "\n" + "Index Column Count: " + _columns.Count + "\n"; }
11
3143
by: ThunderMusic | last post by:
Hi, I have a windows service that only loads a CSV file and import it's data using SqlBulkCopy in a newly created Sql Server 2005 table using 25000 rows batches. If I build the service in debug mode and run it, I get descent performances. If I build it in release mode, I would expect it to at least stay as fast and maybe be faster, but I actually lose performance. I lose about 10% performance.
3
3374
by: =?Utf-8?B?bG10dGFn?= | last post by:
We have developed a number of different applications (ASP.NET web site, Windows services, DLLs, Windows forms, etc.) in C# 2.0. We have developed and unit tested all these applications/components using Debug mode. Now we are ready to compile everything for release to production. However, we don’t know whether we should compile all the applications/components/assemblies using Release mode (or keep everything in Debug mode). We’ve...
4
2055
by: Mel | last post by:
I want to send an email in release mode but not in debug mode, how would I accomplish this? Here is my email code (using vb.net, visual studio 2005, winxp pro sp2): Try Dim MailMsg As New MailMessage(New MailAddress("from@mycompany.com"), New MailAddress("tothedeveloper@mycompany.com")) 'from, to MailMsg.Subject = "Program Generated an Error"
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.