[Scummvm-devel] Kyrandia engine loading is slow on the DS
neil at millstone.demon.co.uk
Thu Aug 21 00:46:07 CEST 2008
Max Horn wrote:
> 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.
I'm not sure about that, the files requested seem to jump about various
different directories, meaning I'd effectively have to keep most of the
disk's directory information cached, which is probably going to be a lot
of RAM for large (2Gb are supported) disks , something I have very
little of. Surely the answer is to fix the engine rather than hack the
backend? There's certainly no problem running any other game with the
current DS loader code.
Besides, this problem is likely to slow down other versions of the game
too. I would imagine this will slow down GP2X, WinCE, Symbian etc.
Probably not as much though.
More information about the Scummvm-devel