[Scummvm-devel] Memory consumption in GUI branch
Neil Millstone
neil at millstone.demon.co.uk
Mon Dec 15 23:28:57 CET 2008
Robin Watts wrote:
> In message <60086A3C-3A2F-448E-BD9E-603570FCB02E at quendi.de>
> Max Horn <max at quendi.de> wrote:
>
>> any news on the thumb code?
>>
>
> Nope. Still swamped in real world stuff. Sorry.
>
> Reports on the forums appear to be that some games work, and some
> don't.
>
> I've reproduced one of the problems (with Sam N Max) on my machine,
> but not had a chance to look into it.
>
>
A month or so ago I tried to reproduce the compiler bugs with the latest
(at the time) version of Devkitarm. None of the places that used to
crash still crashed, so there's a possibility that the compiler was
fixed. Or maybe ScummVM has changed so it no longer triggers the
compiler bug. In any case, the bugs I found didn't seem to be compiler
issues but more like the usual issues and crashes that crop up when I
leave the DS backend alone for a few months.
>> BTW, I noticed that mixer.cpp is listed in OPTLIST, causing it to
>> be compiled with -O3 instead of -Os. Over hear, that makes it grow
>> from 4526 bytes code size to 15540 bytes, so almost 11k more.
>> Looking at the source, this is because there are many loops ranging
>> from 0 till NUM_CHANNELS-1 (so 16 iterations), which get unrolled,
>> and then lots of code gets inlined. Yet the only code in mixer.cpp
>> which is vaguely speed critical would be MixerImpl::mixCallback()
>> and Channel::mix(); yet most of *their* time is spent in calling
>> the rate converter & mixing code, which is written in ARM asm these
>> days.
>>
>
> I suspect it being in OPTLIST predates the ARM coding.
>
Yep.
>
>> So, I wonder -- is it really necessary to keep that file in
>> OPTLIST? If so, can you pinpoint which part of it is speed
>> critical? We might be able to make it so that only that part of the
>> code gets optimized...
>>
>
> I'd have no objection to seeing it moved out - but then it wasn't me
> who put it there, so Neil is the guy to ask...
>
>
If there's nothing speed critial in there than it can go. Please feel
free if you want to remove it.
- Neil
More information about the Scummvm-devel
mailing list