This one has me at whit's end.
In order for this to make sense, I will have to lay out the "facts" to
get a hypothesis. There is no easy way to explain this.
Environment: VC2005. MFC Application. Native only.
I compile and link the App.
If I hit CTRL-F5....results 700 ms. (does not recompile or relink)
If I double click in debug folder..700 ms. (does not recompile or
relink)
If I hit F5 (Start With Debugging)...re sult 200 ms. (does not recompile
or relink)
Profiling the code shows that a computationally expensive function
takes 3 times as long if NOT being debugged. Oddly, a function thats
being called from a DLL takes the same amount of time in both
instances. In other words, it is not a uniform slowdown of the App.
So what are some differences between CTRL-F5 and F5?
Working directory for one.
So to make SURE that both are using the same sets of DLLs, I copy all
the DLL's that the debugger loads(shown in output window) into a
temporary directory, and place my app there.
I run the app. Still 700 MS.
What other differences are there between attaching the debugger and NOT
attaching the debugger that could cause this kind of slowdown???? 9 3245
Additional Detail:
I have found that the culprit is the _DEBUG preprocessor directive.
As I understand it, _DEBUG causes things to be handled differently at
the CRT level...
Is this perhaps a data alignment issue? I don't want to be
distributing debug builds.... lo***********@y ahoo.com wrote: This one has me at whit's end.
In order for this to make sense, I will have to lay out the "facts" to get a hypothesis. There is no easy way to explain this.
Environment: VC2005. MFC Application. Native only.
I compile and link the App.
If I hit CTRL-F5....results 700 ms. (does not recompile or relink) If I double click in debug folder..700 ms. (does not recompile or relink) If I hit F5 (Start With Debugging)...re sult 200 ms. (does not recompile or relink)
Profiling the code shows that a computationally expensive function takes 3 times as long if NOT being debugged. Oddly, a function thats being called from a DLL takes the same amount of time in both instances. In other words, it is not a uniform slowdown of the App.
So what are some differences between CTRL-F5 and F5?
Working directory for one.
So to make SURE that both are using the same sets of DLLs, I copy all the DLL's that the debugger loads(shown in output window) into a temporary directory, and place my app there.
I run the app. Still 700 MS.
What other differences are there between attaching the debugger and NOT attaching the debugger that could cause this kind of slowdown???? lo***********@y ahoo.com wrote: Additional Detail:
I have found that the culprit is the _DEBUG preprocessor directive.
As I understand it, _DEBUG causes things to be handled differently at the CRT level...
Is this perhaps a data alignment issue? I don't want to be distributing debug builds.... lo***********@y ahoo.com wrote:
This one has me at whit's end.
In order for this to make sense, I will have to lay out the "facts" to get a hypothesis. There is no easy way to explain this.
Environment : VC2005. MFC Application. Native only.
I compile and link the App.
If I hit CTRL-F5....results 700 ms. (does not recompile or relink) If I double click in debug folder..700 ms. (does not recompile or relink) If I hit F5 (Start With Debugging)...re sult 200 ms. (does not recompile or relink)
Profiling the code shows that a computationally expensive function takes 3 times as long if NOT being debugged. Oddly, a function thats being called from a DLL takes the same amount of time in both instances. In other words, it is not a uniform slowdown of the App.
So what are some differences between CTRL-F5 and F5?
Working directory for one.
So to make SURE that both are using the same sets of DLLs, I copy all the DLL's that the debugger loads(shown in output window) into a temporary directory, and place my app there.
I run the app. Still 700 MS.
What other differences are there between attaching the debugger and NOT attaching the debugger that could cause this kind of slowdown????
lostnewmexico:
I think you are confusing running under the debugger (versus not) with
debug build versus release build.
In debug build, _DEBUG is always defined, regardless of whether you are
running under the debugger.
In release build, _DEBUG is not defined, and you normally do not run
under the debugger (though you can).
I think you are telling us about speeds of the debug build, with and
without the debugger attached. What you say does surprise me, but
ulimately all that matters is the speed of the release build. I would
hope that it would be faster than the debug build (with or without the
debugger).
David Wilkinson
Thanks for the response David,
I'm not confusing the two...the issues seem to be intertwined.
Check this out:
With _DEBUG defined:
200 MS with or without Debugger attached.
With NDEBUG defined:
200 MS with Debugger attached.
700 MS without Debugger attached.
Thanks for the response David,
I'm not confusing the two...the issues seem to be intertwined.
Check this out:
With _DEBUG defined:
200 MS with or without Debugger attached.
With NDEBUG defined:
200 MS with Debugger attached.
700 MS without Debugger attached.
> Is this perhaps a data alignment issue? I don't want to be distributing debug builds....
one thing with debug builds: they are built by default to enable buffer
overload detection and extra runtime checking.
For example, if you corrupt your stack in debug build, you get debugger
output messages saying so. I've seen this a few times.
This implies (at least i think it does) that during your program execution,
there is a lot of stuff going on in the background.
when you are ready to release your application, change the configuration to
release. rebuild, and ship the output of the release configuration.
the release configuration will always be faster than the debug builds.
because it will be optimized, and not do all of the debugging stuff.
--
Kind regards,
Bruno. br************* *********@hotma il.com
Remove only "_nos_pam" lo***********@y ahoo.com wrote: Thanks for the response David,
I'm not confusing the two...the issues seem to be intertwined.
Check this out:
With _DEBUG defined:
200 MS with or without Debugger attached.
With NDEBUG defined:
200 MS with Debugger attached. 700 MS without Debugger attached.
Well, there is more difference between debug and release builds than
just _DEBUG and NDEBUG. Optimization level, library versions ... Are
you creating a true release build?
David Wilkinson
David Wilkinson wrote: lo***********@y ahoo.com wrote:
Thanks for the response David,
I'm not confusing the two...the issues seem to be intertwined.
Check this out:
With _DEBUG defined:
200 MS with or without Debugger attached.
With NDEBUG defined:
200 MS with Debugger attached. 700 MS without Debugger attached.
Well, there is more difference between debug and release builds than just _DEBUG and NDEBUG. Optimization level, library versions ... Are you creating a true release build?
David Wilkinson
Thats true David, but the only thing I am changing is the _DEBUG to
NDEBUG for this...Essentia lly, I delted my Release configuration, made
a new Release configuration out of Debug, then flipped things until
this problem reoccured.
The ONLY thing that is different is the _DEBUG to NDEBUG change.
So I guess I need to find out the exact differences between the two.
> Essentially, I delted my Release configuration, made a new Release configuration out of Debug,
I don't think NDEBUG vs. DEBUG is making the diference. My guess is that you
have some debug build options(s) set in both the release and debug builds. It
could be that the symbol file loads faster or is preloaded when running in
the debugger but is simply unused overhead when not using the debugger.
To really prove it out - try a true release build (e.g. no symbol
generation, optimize for speed, etc.) and then compare that to running under
the debugger vs. outside the debugger.
--
Greg McPherran www.McPherran.com
In case this could possibly help someone else, I found the problem.
For some reason, when you divide a float by 0, this takes a lot more
time under release than debug to generate or deal with the quiet NAN's.
I This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Noam Raphael |
last post by:
Hello,
Many times I find myself asking for a slice of a specific length, and
writing something like l.
This happens both in interactive use and when writing Python programs,
where I have to write an expression twice (or use a temporary variable).
Wouldn't it be nice if the Python grammar had supported this frequent
use? My idea is that the expression above might be expressed as
l.
|
by: Dean |
last post by:
This is a problem in ASP.NET, when I run an application
from Visual Studio (2003) when I do a "start without
debugging".
The asp page uses objects that I have built in 3 other
projects, BusinessObjects, GeneralUtilities, and
ASPNETMenu (purchased).
Sometime when I will get an error message that says:
Parser Error Message: Access is denied: 'ASPnetMenu'.
and the aplication will not start. It seems to happen
randomly , and it can...
|
by: The Last Danish Pastry |
last post by:
A couple of days ago there was a thread "Returning the machine epsilon".
The responses in that thread suggested using Double.Epsilon or
Single.Epsilon. Since both these seem to return zero I thought I would try
to compute these epsilons myself. Using the following program fragment:
===================================
private void button4_Click(object sender, System.EventArgs e) {
float a;
float f= 1.0f;
|
by: mg |
last post by:
The following .exe and its parameters work correctly from the command prompt
(it prints x.pdf without prompting the user.
acrord32.exe /t "c:\exportfiles\x.pdf" "HP LaserJet 3300 Series PCL 6" "HP
LaserJet 3300 Series PCL" "DOT4_001"
But, I have not been able to use the exe and its parameters as arguments #1
& #2 in System.Diagnostics.Process.Start( arg1 , arg2) when run in the code
behind of a Visual Studio WebForm
|
by: Lucas Tam |
last post by:
Hello,
I'm trying to launch a Windows Form Remoting Server which listens on port
54321 using Process.Start.
Process.Start launches the application correctly, but I can't seem to
connect to port 54321.
I noticed that Process.start launches with the ASPNET account - does the
ASPNET account lack the permissions required to listen on non IIS ports?
| |
by: Nick Ward |
last post by:
Hey,
I'm writing an app using C# visual studio express edition. When i run it in
debug mode it runs fine and works perfectly, but when i run it without
debugging (or from explorer) it crashes and comes up with a "send error
report" dialog. Does anyone know why this happens, or how to find out why it
is happening? Obviously if it was running in debug mode it would break and
show me where the error is but since it isn't, how do i find out?...
|
by: AnalogKid17 |
last post by:
I have the following line of code in my start/login page:
document.getElementById("txtLogin").focus();
When I run the website app through F5 (Debug, Start Debugging) it works
fine (ie, focus on txtLogin). When I run with CTRL+F5 (Debug, Start
without debugging) the focus defaults to the URL box.
Can anybody unveil the mystery ?
|
by: Bob Rock |
last post by:
Hello,
I'm using an executable (for which I do not have the source code nor the pdb
file) as the startup application to load a DLL I'm writing and need to
debug. If I try to debug the DLL I immediately get the error "Unable to
start debugging. Unable to start program XXX.exe". If I do "Start without
debugging" my startup application gets correctly executed. Is this problem
due to the fact I'm missing the debugging information for the...
|
by: markmcgookin |
last post by:
Hi Folks, this is a problem I had a few days ago, and I was able to solve it, but I thought I'd post the solution I found here incase anyone has a similar problem!
I found this stuff on an MSNDN forum.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |