Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Different EXE size when doing a "Compile" and a "Build"?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Aug 11, 2016 3:39 AM Last Post By: Andreas Hausladen
Alexander Halser


Posts: 7
Registered: 11/22/99
Different EXE size when doing a "Compile" and a "Build"?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 11, 2016 1:25 AM
I noticed a very strange phenomenon with XE6 and we can reproduce this on two independent computers: a complete "build" of our project will produce an EXE with about 37 mb. If I do a simple "Compile" - right after the complete build - the EXE file increases to 39 mb. If there are no changes, the simple "Compile" always compiles 248 lines. That should be zero lines, I assume.

The most obvious answer would be: older DCUs are in use. But that's not the case. I can delete all DCUs including the Win32 output directory, and to a simple "Compile": this results in a defacto full "build" and produces the same result as the deliberate "build". Doing a second compile after that brings back the increased EXE size.

Comparing the DCUs in the \Win32 output folder (a - the DCUs after a "Build" and b - the DCUs after a "Compile") is a total mystery, because they are equal in size. Well, almost, the total size of the DCUs is about 40 mb and they differ by 14 bytes. That could be a different time stamp perhaps. The compiled EXEs, on the other hand, differ by 2 mb. What can cause such a difference?

Edited by: Alexander Halser on Aug 11, 2016 1:28 AM
Andreas Hausladen

Posts: 46
Registered: 6/5/00
Re: Different EXE size when doing a "Compile" and a "Build"?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 11, 2016 3:39 AM   in response to: Alexander Halser in response to: Alexander Halser
Alexander Halser wrote:
What can cause such a difference?

Generics maybe. A "build" compiles every file and the compiler can merge same-type Generics better than if it has to use DCUs where Generics are already expanded. But that is only guesswork. Only Embarcadero can look at the compiler's source and tell you why.

Regards,
Andreas Hauladen

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02