Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-12

Compiled file size (again)

8 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jürgen Hestermann

I know this topic has been discussed multiple times but I am astonished about it repeatedly.
I know that FPC/Lazarus exe files are way larger in size than i.e. Delphi exe files.
But I am wondering why it even increases in such short time slots:

I compiled my program without change with the following builts and resulting sizes (after stripping debug information):

Lazarus-0.9.31-33059-fpc-2.5.1-20111024-win32: 1.643.520 bytes Lazarus-0.9.31-34078-fpc-2.5.1-20111210-win32: 1.872.896 bytes

The size itself is huge IMO but it even increases rapidly. 229,376 bytes (nearly 14%) added in not even two months is a lot.

Anybody who has an idea why?

Reply by email

Mattias Gaertner
to Jürgen Hestermann
Show quoted text 16 lines
I know this topic has been discussed multiple times but I am astonished about it repeatedly. I know that FPC/Lazarus exe files are way larger in size than i.e. Delphi exe files. But I am wondering why it even increases in such short time slots: I compiled my program without change with the following builts and resulting sizes (after stripping debug information): Lazarus-0.9.31-33059-fpc-2.5.1-20111024-win32: 1.643.520 bytes Lazarus-0.9.31-34078-fpc-2.5.1-20111210-win32: 1.872.896 bytes The size itself is huge IMO but it even increases rapidly. 229,376 bytes (nearly 14%) added in not even two months is a lot. Anybody who has an idea why?

You can install Cody and find out

http://wiki.lazarus.freepascal.org/Cody#PPU_files_of_project

Mattias

Reply by email

Curt Carpenter
to Jürgen Hestermann: I know this topic has been discussed multiple times but I am astonished about it…

No idea personally -- but I will watch for the response from the hard-working and knowledgeable people that contribute here (who all deserve our vote of thanks and gratitude!)

Maybe some corrected elements still have their debug information enabled?

J?rgen Hestermann wrote 28 lines
I know this topic has been discussed multiple times but I am astonished about it repeatedly. I know that FPC/Lazarus exe files are way larger in size than i.e. Delphi exe files. But I am wondering why it even increases in such short time slots: I compiled my program without change with the following builts and resulting sizes (after stripping debug information): Lazarus-0.9.31-33059-fpc-2.5.1-20111024-win32: 1.643.520 bytes Lazarus-0.9.31-34078-fpc-2.5.1-20111210-win32: 1.872.896 bytes The size itself is huge IMO but it even increases rapidly. 229,376 bytes (nearly 14%) added in not even two months is a lot. Anybody who has an idea why? -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Felipe Monteiro de Carvalho
to Jürgen Hestermann: I know this topic has been discussed multiple times but I am astonished about it…
J?rgen Hestermann wrote
I know this topic has been discussed multiple times but I am astonished about it repeatedly.

Did you check how big are other widely used cross-platform frameworks?

1> Java -> Something like 50MB for Windows

2> Qt -> The bare minimum installer which I managed to obtain for a Mac OS X LCL-Qt application was 28MB
http://sourceforge.net/projects/magnifier/files/magnifier%20for%20Mac%20OS%20X/3.3.2/

And that's zipped.

Now I switched to LCL-Carbon and the size of the installer went down to 1,6MB

http://sourceforge.net/projects/magnifier/files/magnifier%20for%20Mac%20OS%20X/3.6/

3> Gtk. I'd say at least 100MB for all the crap it brings in

But your post was indeed useful. I was already since some time worried about the LCL-CustomDrawn-Android file size and I installed Cody and it helped me chop off 2MB out of the file size due to units wrongly added to the uses clause. It is still 2x bigger then the same project built against LCL-CustomDrawn-X11, which is very strange, since the source code is nearly identical. Maybe smartlinking for arm is much worse then for x86?

Felipe Monteiro de Carvalho

Reply by email

Martin
to Mattias Gaertner: On Wed, 14 Dec 2011 18:34:56 +0100 You can install Cody and find out…
Mattias Gaertner wrote 13 lines
On Wed, 14 Dec 2011 18:34:56 +0100 J?rgen Hestermann wrote: > Lazarus-0.9.31-33059-fpc-2.5.1-20111024-win32: 1.643.520 bytes > Lazarus-0.9.31-34078-fpc-2.5.1-20111210-win32: 1.872.896 bytes > > The size itself is huge IMO but it even increases rapidly. > 229,376 bytes (nearly 14%) added in not even two months is a lot. > > Anybody who has an idea why? You can install Cody and find out http://wiki.lazarus.freepascal.org/Cody#PPU_files_of_project

very impressive.
but it doesn't tell how much of each ppu will be in the exe after smart-linking

compile with debug info, and dump all the symbols with objdump (part of fpc). to estimate the size, sort them by address and get the diff to the next symbol.

Reply by email

Martin
to Jürgen Hestermann: I know this topic has been discussed multiple times but I am astonished about it…
J?rgen Hestermann wrote
The size itself is huge IMO but it even increases rapidly. 229,376 bytes (nearly 14%) added in not even two months is a lot.

That statement is quite biased, if not grossly misleading. It may be true, I do not doubt that... but

maybe this can be narrowed down to a single commit... then it would even be possible to say "Lazazrus generated min exe grew by 14% from one day to the next"
Also true, it is misleading as this would be a rare exception day.

If you want to talk growth rate: What were the annual rates of the last 5 years?

What maybe relevant changes/addition do the changelogs mention for those times?
(Or better, see my other mail, and find out what extra code really ends up in the exe)

Reply by email

Martin
to Jürgen Hestermann: I know this topic has been discussed multiple times but I am astonished about it…
J?rgen Hestermann wrote 16 lines
I know this topic has been discussed multiple times but I am astonished about it repeatedly. I know that FPC/Lazarus exe files are way larger in size than i.e. Delphi exe files. But I am wondering why it even increases in such short time slots: I compiled my program without change with the following builts and resulting sizes (after stripping debug information): Lazarus-0.9.31-33059-fpc-2.5.1-20111024-win32: 1.643.520 bytes Lazarus-0.9.31-34078-fpc-2.5.1-20111210-win32: 1.872.896 bytes The size itself is huge IMO but it even increases rapidly. 229,376 bytes (nearly 14%) added in not even two months is a lot. Anybody who has an idea why?

no idea,

but some of the size is because the compiler (nor the IDE) can not know certain thinks.

Like what will be loaded from resources. Any published property could be accessed.

As soon as anything (even the forms icon, or an icon for a button) uses graphics, those graphics could be in any format. And more the app could open an image from a file that the user
ass that always worked (that's how RAD works, the programmer does not need to think about those thinks)

So unit graphics and those used by it register all graphic decoders (png, jpg ...) in initialization sections => and those decoders are always present (can not be smart linked away)

Try finding and commenting them to see how much that is ...

find other similar code...

Reply by email

Ludo Brands
to Martin: very impressive. but it doesn't tell how much of each ppu will be in the exe after…
Show quoted text 6 lines
compile with debug info, and dump all the symbols with objdump (part of fpc). to estimate the size, sort them by address and get the diff to the next symbol.

Or compile with -Xm. This generates a big .map file that explains what modules are linked, symbols referenced in each module, code removed by the smart linking and finally the memory map of the executable with the position and size of every module.
Don't know if this is working and with the same verbosity on all platforms.

Ludo

Reply by email