I would like to have a report that explains clearly why an exe built with Delphi has a specific size.
For example something like this:
filename: Project1.dpr - total size 100MB
Details:
- unit1.dcu - 20MB
- unit2.dcu - 60MB
- libraries.dcu - 20MB
I'd like to have this kind of report to understand why an exe i just built is 120MB in size. It uses many files from another application that when built is 90MB. I added just two units (and removed many) and the size changed from 90 to 120 MB. I was expecting a smaller size (considering many removed units).
is there some tool that already does this or is there a way to study this issue from the IDE?
I would like to have a report that explains clearly why an exe built with Delphi has a specific size.
Ville Krumlinde wrote a tool that reports the unit sizes in an exe file by parsing the map file, created by the linker: DelphiUnitSizes.
Set Project Options|Linking|Map File
to Publics
or Detailed
and make a full build of the exe. Open the resulting map file with DelphiUnitSizes
.
Another similar tool is MapFileStats by Eric Grange.
can i use EurekaLog without debuginfo?
From EurekaLog documentation:
"Debug Information" (Linker page, new Delphi)/"Include TD32 debug info" (old Delphi)/"Full debug information" (C++ Builder) - this option embeds debug information for external debugger in TD32 format into your application. You may need this option if you use "Run"/"Attach to process" and Delphi can not find debug information. Also, EurekaLog uses TD32 info to complete missing information in C++ Builder. Note, that size of your Delphi application can increase 5-10 times by enabling this option (C++ Builder writes information in separate .tds file), unless you enable "Place debug information in separate TDS file" option.
And
"Map file" - by enabling this option you tell the Delphi's linker to create a separate .map file along with your executable. Map file contains human-readable representation of debug information. Different settings for this option controls the detalization level of output. Usually, there is no need to change it to anything, which differs from "Off" or "Detailed". The map-file is used by various tools as primary source of debug information. For example, EurekaLog automatically turns this option on and uses map-file to create a debug information in its own format and then injects it into application. That is why you rarely need to change this option manually.
This means that the map file is injected in a way into the exe file, while including full debug information into the exe is optional.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With