Size difference (Release / Debug)

3

In Delphi has Build Configurations (Release and Debug), by choosing the Release the size of the executable decreases, I wanted to know what it does not include in the Release because the size had a considerable decrease in relation to Debug.

    
asked by anonymous 12.08.2016 / 18:12

2 answers

4

Debug

This is the form of compilation used to debug the application. It will generate a larger executable because of this, because to debug some things, it is necessary to have the reference points of the code.

Release

It is the lean compilation form, where the version that is made available to the client is generated. It is smaller because we do not need the references.

-

This is the basic difference between the two, but you can individually customize each one:

ThiswillallowyoutododifferentvalidationswhenyouareinReleaseorDebugusingpolicies.

-

Youcanevencreateyourownforms,whereyoucanaddmemoryleakchecks,CodeReview,Coverageandvariousotherthings:

    
12.08.2016 / 19:32
2

By default there are three build configurations: Base , Debug and Release .

Debug and Release and Debug / strong> are listed in separate nodes.

Youcanchangetheoptionvaluesinanysetting,includingBase.YoucandeletetheDebugandReleasesettings,butnotBasesettings.

Whenyoucompileandsaveaproject,thefilesaresavedtoadirectorywhosenamematchesthenameofthecurrentbuildconfiguration.TheDebugandReleasedirectoriesarebydefault,andadirectoryiscreatedforanycustombuildconfigurationthatisactivewhenyousaveaproject.

  • UsetheDebugconfigurationwhentheprojectisindevelopmentstage,wheredebuggingoftheprojectisrequired.

  • UsetheReleasesettingwhentheprojectisinthefinaldevelopmentstage,theversionthatwillbemadeavailabletotheenduser.

Abouttheapplicationsize:thisisduetotheDebugconfigurationbeingaBaseextension,butwithoutoptimization,debugging,aswellasthedefinitionofspecificsyntaxoptions.

TheReleasesettingisalsoaBaseextension,butdoesnotproduce symbolic debugging information , the code is not generated to make calls to TRACE and ASSERT , and this causes the size of the executable is reduced.

Below is a comparison between the two configurations:

Original image here

Sources: 1 , 2

    
12.08.2016 / 19:52