[Scummvm-devel] ScummVM binary size comparison

Max Horn max at quendi.de
Mon Nov 17 12:12:08 CET 2008

Am 16.11.2008 um 04:17 schrieb Neil Millstone:

> Hi everyone,
> I applied the following fixes:
> - Rebuilt the theme to strip whitespace as suggested
> With these, there is now 2028Kb of RAM in use at the launcher.  So  
> we've
> trimmed 120Kb of fat, which is pretty good going!  Another 60Kb and
> we'll be were we were at 0.12.0 release time.

Great :)
> I haven't yet applied the font data fix.

That one is actually already in the repos. I also just commited a  
change to sound/audiostream.o which saves another 4k or so. And a  
change to sound/fmopl.cpp which saves 32k (by moving a static array to  
the heap).

Also, Tanoku / Vicent is working on shrinking ThemeParser &  
ThemeEngine. Once that is done, I am pretty sure we'll be at or even  
better than what we had in 0.12.0. Of course, no reason to stop  
there... ;)

All in all, I now get this (note that I sort by TEXT+DATA, which seems  
to be more meaningful here):

$ /opt/devkitpro/devkitARM/bin/arm-eabi-size arm9/scummvm-A/*/*.a |cut  
-c27- |sort -nr |head -n 20
36407	   8e37	ThemeParser.o (ex arm9/scummvm-A/gui/libgui.a)
35114	   892a	ThemeEngine.o (ex arm9/scummvm-A/gui/libgui.a)
25028	   61c4	launcher.o (ex arm9/scummvm-A/gui/libgui.a)
21290	   532a	options.o (ex arm9/scummvm-A/gui/libgui.a)
18244	   4744	adlib.o (ex arm9/scummvm-A/sound/libsound.a)
17152	   4300	VectorRendererSpec.o (ex arm9/scummvm-A/graphics/ 
15684	   3d44	about.o (ex arm9/scummvm-A/gui/libgui.a)
15540	   3cb4	mixer.o (ex arm9/scummvm-A/sound/libsound.a)
15344	   3bf0	fmopl.o (ex arm9/scummvm-A/sound/libsound.a)
11376	   2c70	unarj.o (ex arm9/scummvm-A/common/libcommon.a)
11236	   2be4	audiostream.o (ex arm9/scummvm-A/sound/libsound.a)
10470	   28e6	saveload.o (ex arm9/scummvm-A/gui/libgui.a)
10204	   27dc	widget.o (ex arm9/scummvm-A/gui/libgui.a)
10204	   27dc	default-events.o (ex arm9/scummvm-A/backends/ 
10167	   27b7	config-manager.o (ex arm9/scummvm-A/common/libcommon.a)
10078	   275e	ym2612.o (ex arm9/scummvm-A/sound/libsound.a)
  9894	   26a6	console.o (ex arm9/scummvm-A/gui/libgui.a)
  9478	   2506	advancedDetector.o (ex arm9/scummvm-A/common/libcommon.a)
  8323	   2083	archive.o (ex arm9/scummvm-A/common/libcommon.a)
  8276	   2054	stream.o (ex arm9/scummvm-A/common/libcommon.a)

Interestingly, the numbers are smaller than on your system. I don't  
know why, I didn't do anything special to the settings in the  
Makefile, other than adding the same defines as you did. Maybe we have  
different versions of devkitPro? Mine is gcc version 4.3.0 (devkitARM  
release 23b), according to "/opt/devkitpro/devkitARM/bin/arm-eabi-c++ - 

Oh, and I wonder why mixer.o occurs for me in the top 20, but not for  
you. Weird.

> I'm not sure why you can't build the code currently, Max.  The two
> header files you mentioned should be automatically built by the
> makefile.  This is something which hasn't changed since it was  
> written.
> Perhaps deleting the whole scummvm-A folder and rebuilding would  
> make it
> work?

Actually, that was what caused the problem in the first place. a "make  
clean" fixed it. The problem is a subtle bug in the Makefile: It does  
not declare how/where icons_raw.h is created, it just is created as a  
side-effect of build rule for arm9/data/icons.o -- but icons_raw.h was  
created as arm9/data/scummvm-A/icons_raw.h. Hence when I removed that  
dir, the header file was not regenerated.

I guess this should be fixed in the build file -- the header should be  
created in arm9/data/.


More information about the Scummvm-devel mailing list