[Scummvm-devel] Kyrandia engine loading is slow on the DS

Bertrand Augereau bertrand_augereau at yahoo.fr
Fri Aug 22 14:08:59 CEST 2008


Hi guys,here is a little additionnal patch that decreases the number of detectFileType from 200.000 to 3.000 during Kyra 3 initialization (don't have the numbers for other Kyrandia games).It does so by cherry picking the detectFileTypes to the added file after a PAK is loaded instead of iterating on the whole _map once again.Additionnaly, I checked the new hash map put by Max on the tracker, and it looks that the DS might benefit from the decreased overhead in map lookups.Yet I didn't study the memory tradeoffs implied so it might not be that safe for this version on tight devices.
Getting inspiration from the Python code is a good idea, because dictionary lookups is certainly the only corectly-performing stuff in the whole language :DEnough nastiness :),keep up the good work, everybody, Cheers,Bertrand

--- En date de : Ven 22.8.08, Max Horn <max at quendi.de> a écrit :
De: Max Horn <max at quendi.de>
Objet: Re: [Scummvm-devel] Kyrandia engine loading is slow on the DS
À: "scummvm-devel devel" <scummvm-devel at lists.sourceforge.net>
Date: Vendredi 22 Août 2008, 10h56

Hi Neil,

thanks for investigating this. Just to make sure: Were your tests done  
with a build made including the changes made in rev r34056, which  
backported
r34055, which was: "Committed patch #2055831 "KYRA: ResFileEntry  
parent cache optimization"." ?

I assume that was the case, but I want to double check, just in case,  
as this patch could potentially affect the issue (Bertrand but some  
great effort into analyzing and reducing the CPU & fopen usage in the  
Kyra startup code with that patch).



Cheers,
Max


Am 22.08.2008 um 10:14 schrieb Neil Millstone:
[...]
> Hi Max & Team,
>
> I have done a little more digging around this issue, and have found  
> that
> the DS fopen does indeed use a cache, in fact it looks like I  
> increased
> the cache size in the Kyrandia build in 0.11.1 order to help this
> issue.  Unfortunately, even with this, it seems the time taken to load
> the game is not spent in the DS backend.  Without a profiler it's hard
> to say why it's so slow, but the engine does seem to search various
> tables for files before it tries to open them on disk.  Perhaps this  
> is
> just too much for the DS's 66Mhz CPU.  I dare not change the Kyra
> loader, it looks extremely complex to me and I don't really understand
> how it works.
>
> So, for now, this issue will have to be in the release notes, although
> I'm sure I will get complaints about it, since this worked in 0.11.1.
>
> - Neil
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Scummvm-devel mailing list
Scummvm-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scummvm-devel



      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20080822/2052280e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: less_detect_file_type.patch
Type: application/octet-stream
Size: 609 bytes
Desc: not available
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20080822/2052280e/attachment.obj>


More information about the Scummvm-devel mailing list