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
0
Nico
7/27/2015 10:07:38 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

3 Replies
981 Views

Similar Articles

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

Nico wrote:

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

You likely have your project configured to store the extra debug info in 
an external .TDS file instead of in the .EXE itself.

-- 
Remy Lebeau (TeamB)
0
Remy
7/28/2015 5:59:17 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> 
> You likely have your project configured to store the extra debug info in 
> an external .TDS file instead of in the .EXE itself.
> 
> -- 
> Remy Lebeau (TeamB)

Hi Remy, yes indeed, that was the reason. Thanks !
0
Nico
7/28/2015 9:15:02 PM
Hi,

I was too fast to say the problem is solved. The exe got smaller because I've built with runtime packages. Forgotten to turn it off. The exe changed again back to it's 75 MB. 
I've found on the internet that RTTI seems to be the troublemaker. The solution as explained on stackoverflow is to include the floowing lines : 

{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

As explained on stackoverflow, from Delphi XE5 on, those lines have to be inserted in EVERY unit of the project. I've inserted it just after the interface keyword, so just before the upper uses clause.
When I've first inserted it on the main form, the exe shrinked from 75MB to 71MB. Adding those lines to other units doesn't shrink the exe any further. So far, those 2 lines are inserted now in approx. 40 units, but the size of the exe is not changing anymore. But maybe having such a large exe is not really a problem, but it just looks weird.

Thanks again, Nico
0
Nico
8/10/2015 8:36:50 AM
Reply: