.EXE image size Debug vs Release build

I have a console application/program. I have assumed that its (.EXE) image size should be smaller when built in "Release" configuration than when built in the "Debug" configuration. However, it turned out the debug image size is much smaller. 

Is this supposed to be the case? Is there any parameter setting which I have missed?

TIA
0
Lawrence
3/3/2010 3:25:21 AM
embarcadero.cppbuilder.ide 2180 articles. 1 followers. Follow

6 Replies
1166 Views

Similar Articles

[PageSpeed] 13
Get it on Google Play
Get it on Apple App Store

Hi Lawrence
Lawrence Ong wrote:

> I have a console application/program. I have assumed that its (.EXE) image 
> size should be smaller when built in "Release" configuration than when built 
> in the "Debug" configuration. However, it turned out the debug image size is 
> much smaller. 
> 
> Is this supposed to be the case? Is there any parameter setting which I have 
> missed?

I dont know if it is supposed to be this way, but it is the only thing
You gain in release mod is speed.

My expirience.

Best regards
Asger
0
Asger
3/3/2010 6:28:58 AM
<Lawrence Ong> wrote in message news:219523@forums.codegear.com...

> I have a console application/program. I have assumed that its (.EXE)
> image size should be smaller when built in "Release" configuration than
> when built in the "Debug" configuration. However, it turned out the
> debug image size is much smaller.

One factor to consider is that expansion of inlined code is generaly turned 
off in Debug mode, resulting in less duplicated code and more CALL 
instructions.

-- 
Remy Lebeau (TeamB)
0
Remy
3/3/2010 7:21:15 AM
Asger Joergensen wrote:

> but it is the only thing
> You gain in release mod is speed.

Not if you also let the code optimiation active in debug mode (because
I like to debug the actual code that will also run on the customer's
computer).


-- 
Andreas Hausladen
0
Andreas
3/3/2010 4:25:33 PM
> {quote:title=Andreas Hausladen wrote:}{quote}
> Asger Joergensen wrote:
> 
> > but it is the only thing
> > You gain in release mod is speed.
> 
> Not if you also let the code optimiation active in debug mode (because
> I like to debug the actual code that will also run on the customer's
> computer).
> 
> 
> -- 
> Andreas Hausladen
I like this idea. May I ask which flag I need to set to turn off code optimiazation?  TIA
0
Lawrence
3/3/2010 6:39:47 PM
thnx
0
Lawrence
12/23/2010 7:38:09 AM
The problem with debugging release code is that some code will appear not to execute, or to execute out of order.  The compiler can optimize entire lines away, or generate code out of order from the underlying C++ code.   

So although you can debug release mode, you have to know the caveats as well or you might get royally confused  :-)

Gregor

> {quote:title=Lawrence Ong wrote:}{quote}
> > {quote:title=Andreas Hausladen wrote:}{quote}
> > Asger Joergensen wrote:
> > 
> > > but it is the only thing
> > > You gain in release mod is speed.
> > 
> > Not if you also let the code optimiation active in debug mode (because
> > I like to debug the actual code that will also run on the customer's
> > computer).
> > 
> > 
> > -- 
> > Andreas Hausladen
> I like this idea. May I ask which flag I need to set to turn off code optimiazation?  TIA
0
Gregor
12/23/2010 11:22:28 AM
Reply:

Similar Artilces:

CB2007 Debug build the exe is smaller than the Release build.
Any reason why a Debug build using C++ Builder 2007 and TMS Unicode Components results in a smaller exe? Should not the *Release* build be the smaller file? <Jason Goff> wrote in message news:40114@forums.codegear.com... > Any reason why a Debug build using C++ Builder 2007 and TMS Unicode Components > results in a smaller exe? Should not the *Release* build be the smaller file? I think the major reason is that release version contains inlined and possibly non-inlined versions of the functions it decided to inline. Typically debug version is built with all functions out...

Debug Build vs Release Build in ASP.NET 2.0
When building an ASP.NET web app with VS2003 I was able to specify whether I wanted a debug build or a release build from either Build|Configuration Manager or using the drop down list on the toolbar. This is turn determined whether the DLL containing the code-behind classes contained debug info, or not.Now that I'm using ASP.NET 2.0 under VS2005 this option isn't obviously available for web projects so assuming that I wanted debug info compiled into the assemblies containing the code-behind classes, am I right to assume this option is now determined by the    <compilation ...

EXE compiled in Debug Mode vs EXE compiled in Release Mode
Hello, On creating the executable in Debug Mode under Windows, if I place the Debug info in a separate TDS file by selecting the relevant option, I can see the resulting EXE is more or less the same size as the EXE created in Release Mode. If I distribute the EXE created in Debug Mode (obviously, without the TDS file) to the final user, will there be any problems? Thanks in advance. ...

EXE compiled in Debug Mode vs EXE compiled in Release Mode [Edit]
Hello, On creating the executable in Debug Mode under Windows, if I place the Debug info in a separate TDS file by selecting the relevant option, I can see the resulting EXE is more or less the same size as the EXE created in Release Mode. If I distribute the EXE created in Debug Mode (obviously, without the TDS file) to the final user, will there be any problems? I did it by mistake and I was wondering whether the application could not work properly on the user's computer. Thanks in advance. Pasquale Esposito wrote: > Hello, > > On creating the executable in Debu...

debug vs release build
I can't seem to find the option to make a 'release' build for an ASP.NET 2.0 website from within VS2005. I remember VS2003 had the option on the toolbar which allowed you to switch between a 'debug' and a 'release' configuration. Although VS2005 still has a configuration manager window, the only option that exists in the dropdown for the web project is 'Debug'. Am I right in thinking that this is now controlled by setting the    <compilation debug="true" /> in the web.config? Thanks.   Hi, yes you are. VS2005 is no longer responsible for the compilation,...

Release Vs Debug Build?
Hello, in order to preserve line numbers in my build code on production, I found a blog that suggested that I build in debug mode, then copy to the web site, then edit the web.config to set debug="false". This solves my major problem, which is obtaining line numbers from pre-compiled code so that I don't have to put my source code on the server. However, my question is whether changing the debug flag to "false" makes my code as fast as if I had compiled it originally in "release" mode (which, as far as I can tell, only differs in the compilation by the...

Release vs Debug Builds?
I have .refresh files setup so my projects in my solution copy their DLLs to the bin on my web site For instance ..\UtilsProj\bin\Debug\UtilsProj.dll Now when I change my project to release mode these paths in .refresh are no longer accurate because the file moves to ..\UtilsProj\bin\Release\UtilsProj.dll It seems like there should be an easy solution to this that doesn't involve hand editing the .refresh files if I change from Debug to Release? I'm not familiar with .refresh files myself. If the Utils project is in the same solution as the web project you can set a project reference ...

Define for DEBUG vs RELEASE build
I would like to always set a value when the app is built for Release, but not in the debug version. What define (if at all) can I check to accomplish that ? -- Best Regards, Peter Peter Van Hove wrote: >I would like to always set a value when the app is built for Release, but >not in the debug version. > >What define (if at all) can I check to accomplish that ? #ifndef _DEBUG // set value #endif ... Peter Van Hove wrote: > I would like to always set a value when the app is built for Release, but > not in the debug version. > > What...

thunderbird release build error: after building current "hg://releases/comm-release" mach swears that no "dist/bin/thunderbird.exe exist"
Hello guys, please help to explain this gorgeous error message. I'm building releases/comm-release, using 'mach' ofcourse. Right after the message "your build is finished successfully", it unexpectedly tells: "Error running mach.... consider filling bug... Exception: Binary expected "OBJ_DIR/dist/bin/thunderbird.exe" doesn't exist" Correct binaries are in fact placed under mozilla binaries "OBJ_DIR/mozilla/dist/bin/thunderbird.exe" The whole piece of log is below: -----------build.log------------- Single process terminated ...

Exe Size Debug/Release almost the same (XE5)
Hi, When I compile my application (around 300 forms + 200 units), I notice not so much difference between debug and release build (76 MB vs. 75 MB). I'm wondering how this is possible. Another small project shows a bigger difference : 35 MB vs. 22 MB. I'm just puzzled. In both applications I use the same components (DB connectivity, DevExpress & ReportBuilder). In both applications I don't use runtime packages and I didn't change any compile settings. I'm using Delphi XE5 update pack 2. Any ideas what could be the reason ? Many thanks in advance, Nico Callewaert ...

Help with huge Exe Size with debug build option? [Edit]
Hi I have recently upgraded to XE from 2010. This has been done on my desktop (running XP pro) and Laptop (W7 Enterprise). My current project always built at around 12Mb with debugging enabled (similar size on both machines). But now, when I build my project on the desktop with debugging enabled, it is now 28Mb (D2010) and 33Mb (XE). But if I build the same project on the laptop it is still 12Mb (D2010) and 13Mb (XE). If I build with debugging Off, then size is back around 12-13Mb What could have happened on my desktop to get such a significant increase in exe size (nearly 3 times la...

Image size vs HDD Size
--____KFLPXKTVRFHNMVOZNNBE____ Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; modification-date="Tue, 18 Dec 2006 04:36:28 -0600" I originally created my image on a 40 GB drive but with Hard Drives = growing we are now getting bigger drives. So when I image PC's with the = bigger drives with my base image it only shows 40 GB available. Is there a = way I can image to the full disk? I'm sure I've seen this before somewhere but can't seem to find it.=20 Thanks --____KFLPXKTVRFHN...

SpiderMonkey works as Debug-build, not as Release-build
Hi, I have build SpiderMonkey 1.7 as a static library using VS2005 to make a macro plugin for Notepad++. What I did was: - Downloaded js-1.7.0.tar.gz - I added a new static library project to my project - Included the required files (used js.mak as reference for this) - Added jsautokw.h from a nmake build - Made some minor modifications to - jstypes.h: remove __declspec() - jsapi.c: remove DllMain() - prmjtime.c: added <windows.h> As a debug-build, everything works great. But as a release-build it crashes when JS_EvaluateScript() is called even with a scr...

Embedded image size vs attachment size
Hello, Excuse my ignorance on the specific details of embedding images, however I am curious as to the reasoning behind the following scenario in the Groupwise 8 client. I created a .png image file that is ~350kb and saved it locally to my machine. I sent this image as an attachment to my gmail account and the reported size was approximately 350kb, as expected. When I use the "Insert Picture" from the Groupwise client to embed this image directly into the email, the reported size becomes ~850kb, almost 3 times the original size. Finally, if I open the image file...

Web resources about - .EXE image size Debug vs Release build - embarcadero.cppbuilder.ide

Press Release Rocket - News and Current Events
By Toi Williams on December 24, 2014 Workers at more than 1,400 Walmart stores across the nation are set to see their pay rise next year as ...

Press release - Wikipedia, the free encyclopedia
A press release , news release , media release , press statement or video release is a written or recorded communication directed at members ...

Kate Miller-Heike and The Beards release blushing Christmas charity song
It's the day of the ARIA awards, when Australia's musicians get the gifts they've waited all year for but all Kate Miller-Heidke wants for Christmas ...

TV Newsers Feature in Latest Clinton Email Release
The latest batch of emails related to Hillary Clinton ‘s tenure as Secretary of State–in this case, emails of Clinton aide Philippe Reines –include ...

NirSoft releases MMCSnapInsView 1.0
NirSoft has released MMCSnapInsView , a free portable tool which provides details on all the Microsoft Management Console (MMC) snap-ins installed ...

Chicago on edge after release of video of Laquan McDonald shooting
CBS News Chicago on edge after release of video of Laquan McDonald shooting CNN (CNN) Wednesday had been marked as the day by which Chicago ...

'Attack On Titan' Game Gets February Release In Japan
The upcoming game adaptation for the hugely successful Attack on Titan series will be released in Japan next February.

Chicago Police Really Didn't Want To Release Video Of A Cop Shooting Laquan McDonald 16 Times
When Chicago city officials released the dashcam video of police officer Jason Van Dyke shooting 17-year-old Laquan McDonald on Tuesday, it marked ...

SC clears Kunal Kohli’s ‘Phir Se…’ for release
SC gave a clearance to Kunal Kohli's “Phir Se...” for release after it got embroiled in a plagiarism row.

Three Things We Know About ‘Attack On Titan’ Game: 3D Maneuver Gear Mechanics, Story, And Release Date ...
... There are three things we know about the Attack on Titan game so far: incredible 3D Maneuver Gear mechanics, a faithful story line, and a release ...

Resources last updated: 11/27/2015 2:58:51 PM