|
Allergo, Y U SO FAT? |
Chris Katko
Member #1,881
January 2002
|
I do my hobby work on my little netbook these days. It's got a paltry <32 GB SSD and it's pretty full so I was doing some filesystem analysis. Well, surprise-surprise came upon me when I found the Allegro 5 directory was like 600MB-1 GB. Why? Because every executable ... is 5.1 MB. And there are like 200 examples. My question is... why is Allegro so large? 5 MB is like... almost C#/Mono territory. Perhaps it's the debug / profiling symbols? These are Allegro examples so there's literally nothing else in there except Allegro, Allegro dependencies, libc, and a ~100 lines of example code. Linux. Ubuntu ~16. Allegro 5.1.x / git from a few months ago. -----sig: |
amarillion
Member #940
January 2001
|
I do know that the static build (`-DWANT_STATIC_RUNTIME=on`) uses much more disk space than otherwise. And since each example is statically linked, the example directory is blown up enormously. If you compile a static build, do a -DWANT_EXAMPLES=off (if you still need the examples, do a separate non-static build) -- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Wow. Ubuntu sucks. Allegro's GIT src directory weighs in at 74MB. My binary distribution of Allegro 5.2.2 is 75MB including dynamic debug examples, tests, and demos, as well as all dependencies. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
SiegeLord
Member #7,827
October 2006
|
A big fraction of bloat in the core library is due to the dynamically loaded OpenGL symbols. It'd be great to have a good solution for that. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Gideon Weems
Member #3,925
October 2003
|
Thomas Fjellstrom
Member #476
June 2000
|
SiegeLord said: A big fraction of bloat in the core library is due to the dynamically loaded OpenGL symbols. It'd be great to have a good solution for that. Is it just all of the pointers that bloats up the library? Dynamic lookup of some weird kind would be interesting. Have actual inline functions/macros that perform the lookup at runtime and cache them in a table, rather than a bunch of pointers that have to stay around, only the calls that are used will end up sticking around in the final linked program. assuming a static build anyhow. If macros, it'd automatically inline, if inline functions in a header, it'd work, if regular functions in allegro, they'd have to be provided in a separate static library in order to eliminate unused code. -- |
torhu
Member #2,727
September 2002
|
Thomas Fjellstrom said: Is it just all of the pointers that bloats up the library? Dynamic lookup of some weird kind would be interesting. Having all the function names as strings probably doesn't help either... |
Neil Roy
Member #2,229
April 2002
|
My Deluxe Pacman 2 game is statically linked and the release executable is just over 1 MB, the debug is just over 14MB so... Allegro is NOT FAT! It's probably your operating system that is the pig. Besides, who in the hell worries about the size of a debug version?! It's supposed to be fat. --- |
|