Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Why is my recompiled exe sooo huge?

Posted on 2006-07-03
10
Medium Priority
?
401 Views
Last Modified: 2010-04-05
Hi my dear friends!

When using the same source files and recompiling a project I noticed my exe had become huge....I dont know with which version the orignal project was compiled or whether the exe was compressed. (will do so later on cause even with aspacking my new exe it still is twice as hugeas teh original supplied by the project)

The original exe being 87.583 kB of size.

Now when using the same source files adding 5 lines of code and recompiling it, my exe becomes 409.600 kB of size and even after Aspacking it it still is 170 kB of size....abacadabra how can this be?

Regards Paul

ps it is not too big an issue...but I just wonder what causes this.
0
Comment
Question by:PeterdeB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17034081
first way to reduce the complied size is to use BPLS (alt-project-options -> packages -> cuild with runtime packages)
This means you have to ship those bpls though....
2nd way is to make sure you have turned off the debug information as this can bloat your exe (alt-project-options -> compiler)
If you are using a 3rd party tool to assist in debugging such as Eureka Log, this can also increase  your exe size

Finally, you can use UPX to shrink your exe size
http://upx.sourceforge.net/
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17034083
another thing that can bloat is if you have added images/imagelists or similar
0
 
LVL 11

Expert Comment

by:calinutz
ID: 17034234
You could paste here the 5 lines of code that you added that made your application size explode... We could give you a more accurate opinion

Regards
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 12

Expert Comment

by:Ivanov_G
ID: 17035291
Probably these 5 lines add a lot of stuff. For example

var
  CDS : TClientDataSet;

will cause all MIDAS package to be added in your EXE.
0
 
LVL 16

Expert Comment

by:CodedK
ID: 17035412
Check the uses list.
The source you've probably downloaded had only the necessary in uses list.

Check the compiled exe with PeiD to see if it is packed :
http://peid.has.it/

Hope this helps.
0
 

Author Comment

by:PeterdeB
ID: 17041746
Hi Folks!

Thanks for all the replies! I PEID'd the app, it was UPX'd. But still when I pack my exe (I Aspacked it and PeCompacted it) the size still is double the size of the original exe supplied.

The uses clause was entirely identical and the code I added used two procedures coming from one of the units supplied by the downloaded source. So still I have no clue what causes this.

Also when I simply recompile it without any modifications it still grows twice as big as the original (after Aspacking)

Regards Paul
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 500 total points
ID: 17041875
It is because the VCL packages are larger. For example Delphi 3 produce 300KB empty EXE file, while Delphi 2006 (Win32) a bigger one. Try to compile it using lower Delphi version and the compress it.
0
 

Author Comment

by:PeterdeB
ID: 17042716
Hi Ivanov_G I believe your reply to be the answer to my question. It's the only thing left that could have caused it in my opinion. So my question is answered.

Regards Paul :)
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 17042763
I am grad I helped. Few years ago I made some tests:

1) Delphi 3, 4, 5, 6
2) Compile empty EXE file and check size
3) Compile empty EXE file with run-time packages and check size
4) Create empty EXE with Win32 API functions and check size

Delphi 6 was producing almost twice bigger exe files. I think it will be interesting to post it here (if I find it of course).
0
 

Author Comment

by:PeterdeB
ID: 17043998
Well I'm glad you posted it here :)

Regards Paul
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question