[Scummvm-devel] Memory consumption in GUI branch

Max Horn max at quendi.de
Thu Oct 30 18:48:36 CET 2008


Hi Robin, hi Neil,


Am 26.10.2008 um 05:08 schrieb Neil Millstone:

> Robin Watts wrote:
>> In message <48F08B15.5020309 at millstone.demon.co.uk>
>>          Neil Millstone <neil at millstone.demon.co.uk> wrote:
>>
>>> The code growth you mentioned does sound a little worrying, if the
>>> same is seen on the DS build (ARM code tends to have quite poor
>>> code density) then ScummVM is unlikely to run properly anymore, but
>>> as you said, only a single bit format is used for the GUI, so that
>>> should help.
>>>
>>
>> I've just rebuilt DS scummvm here, and the standard ARM build (a
>> cleanish trunk) comes out to 1627712 bytes. If I enable thumb mode
>> during the build (and tweak various ARM routines to cope with being
>> called in thumb mode - will commit those fixes in a bit), the code
>> size drops to 1349696 bytes.

Wow, that sounds very good.

>> There will be a speed penalty of course, but hopefully we can tweak
>> the compile so that speed critical bits stay in ARM ?

The ARM build system already overrides our default .cpp compiler rule,  
just to be able to apply optimization settings only selectively. It  
should be quite easy to adapt that; if necessary, we can decide for  
each file whether to use -O / -O2 / -O3, whether to activate thumb  
mode, and more.

>>
>>
>> Robin
>>
> Perhaps, but when I compiled a Thumb build recently, there were  
> still lots of codegen bugs all over the game when the Thumb build  
> was compiled optimised.  I keep meaning to report this to the  
> Devkitpro team, but haven't yet, as it's difficult to create a small  
> piece of code which repros the bug.

Small cases certainly help tremendously. Can you at least pinpoint for  
which code in ScummVM wrong code is generated? Or is this a case of  
"with thumb mode it crashes in places it doesn't crash without it" ?

> I did eventually get a Thumb build to work by disabling a load of  
> optimisations, and the performance suffered.  I did eventually get a  
> playable version of Full Throttle and The Dig going in Thumb in  
> 0.9.1.  But since the code has grown so much since then, I doubt the  
> same would be possible if I ported these changes to trunk.

Well, maybe the compilers have improved since then, too? Making some  
good bug reports about the codegen issues might help get that  
resolved, too.

Of course we also strive to reduce the ScummVM code size via other  
means, but there is only that much we can do, so it certainly would be  
good to get thumb mode working, at least for some of the files


> I wonder if it's possible to compile a GUI-less version of ScummVM,  
> and then do a custom GUI for the DS port?  Something simple is all  
> that would be required for the launcher, but I suppose the in-game  
> GUI would be an issue too.  Probably not feasable, but I thought I'd  
> mention it anyway.

That was mentioned (quited heatedly ;) by LordHoto. No, that's not  
really an option. However, I think we can reduce the code size with  
some effort, if we all work together as a *team*...


Bye,
Max




More information about the Scummvm-devel mailing list