[Scummvm-devel] PS2 #9 : performance : node optimization : important
Johannes Schickel
lordhoto at gmail.com
Tue Mar 3 13:54:03 CET 2009
Max Horn schrieb:
> It is true that kyra opens kyra.dat 86 times in a row during startup.
> That doesn't seem good. Johannes? It also opens STARTUP.PAK 10 times
> in a row, and many other files are opened like 5 times (e.g.
> FNORTH.PAK etc., right at the start of the game).
Kyra opens a .PAK/.VRM/.APK/.TLK file every time:
- The code wants to retrieve file size of a file embedded (that could
really be cached aye)
- The code reads data from an embedded file
- The code retrieves a file stream to an embedded file
Since there are many file entries in kyra.dat for Kyra1 for example, it
is clear why it opens "kyra.dat" that often. On startup some files from
STARTUP.PAK are loaded it seems. I have currently no idea why FNORTH.PAK
is opened though... :-). Well I would need to look into that, so far I
thought the backend is responsible for caching file opening, else wise I
would need to add some code to cache file streams on the fly...
// Johannes
More information about the Scummvm-devel
mailing list