<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><P>Hi guys,</P><P>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).</P><P>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.</P><P>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.</P><P>Yet I didn't study the memory tradeoffs implied so it might not be that safe for this version on tight devices.<BR></P>Getting inspiration from the Python code is a good idea, because dictionary lookups is certainly the only corectly-performing stuff in the whole language :D<P>Enough nastiness :),</P><P></P><P>keep up the good work,
everybody, </P><P></P><P>Cheers,</P><P>Bertrand</P><P><BR></P><BR>--- En date de : <B>Ven 22.8.08, Max Horn <I><max@quendi.de></I></B> a écrit :<BR><BLOCKQUOTE style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">De: Max Horn <max@quendi.de><BR>Objet: Re: [Scummvm-devel] Kyrandia engine loading is slow on the DS<BR>À: "scummvm-devel devel" <scummvm-devel@lists.sourceforge.net><BR>Date: Vendredi 22 Août 2008, 10h56<BR><BR><PRE>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@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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scummvm-devel
</PRE></BLOCKQUOTE></td></tr></table><br>
<hr size="1">
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </a>