[Scummvm-devel] PS2 #9 : performance : node optimization : important

sunmax at libero.it sunmax at libero.it
Mon Mar 2 23:33:41 CET 2009


>> I don't think mixing general and backend-specific flags in a single
>> field is a good idea, because it exposes backend-specifics to 
>> engines, and also forces a specific way of caching these values on
>> the backends.

>> I agree with Willem here, I guess you can just do it inside your own
>> FSNode implementation. The isDir etc. API is IMHO way nicer than a
>> getFlags method anyway.

I actually agree with all of you guys, and the issue was flagged not
cause I wanted to improve the API (which is surely cleaner this way)
but because I am concerned about performance.

Some (of the not so many) PS2 ScummVM users are reporting that they
are switching to pre-FSNode ScummVM (things like 0.9.0) cause it's
faster - not that they know the internal details, but is starts
faster and games feel faster [on the other hand they did not try
0.13.x yet - so I should personally run a 0.9.0 vs 0.13.x match
before even speaking...]

So I was just wondering if a dirtier but more compact API with
less methods and members could be faster when creating and
deleting FSNodes than a cleaner one, even if I am sure we will
never match a pure fopen C call. I am just trying to reduce the
overhead of a class that is instanced and deleted pretty often
and which is the only change I could think of since 0.9.0 days
that could have had an impact on PS2 performance. I maybe wrong,
once PS2 0.13.x is ready I will benchmark against older version
of ScummVM and let you know.

In the meanwhile all suggestions are welcome.

Thanks!
 -max





More information about the Scummvm-devel mailing list