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

Max Horn max at quendi.de
Wed Aug 20 23:41:19 CEST 2008

Am 20.08.2008 um 23:34 schrieb Bertrand Augereau:

> Hi Neil, hi team,
> given your numbers we can approximate the time of a fopen to 15ms.
> Therefore, on the 65 seconds to launch Kyrandia 1, the 2k fopen  
> account for 30 sec, and the rest is 35 seconds.
> Maybe we could maintain a cache of filename to file handles in kyra  
> resource manager to open files only once, we probably could gain 20  
> seconds more.
This will be solved for good by the file handling revamp on which  
peres and I am working, which besides other things, implements a cache  
for which files exist and which don't. But it won't make it into the  
0.12 release, too many deep changes are involved.

In the meantime, though, you could of course simply write a more  
clever fopen implementation. Since the DS provides a custom fopen  
anyway, a simple cache could be implemented in there. I reckon that  
would take maybe 50 lines of code to do, and should easily bring down  
the load times to a few seconds.


More information about the Scummvm-devel mailing list