[Scummvm-devel] Slowdowns in SCI and SAGA
max at quendi.de
Wed Nov 25 17:10:17 CET 2009
Am 25.11.2009 um 16:51 schrieb Filippos Karapetis:
> I really don't know what could be wrong with SAGA. The engine checks
> for the presence of certain files on startup to enable/disable
> features... perhaps Common::File::exists() is slow on the PSP?
Hm, I thought our current File::exists() method just calls SearchMan,
which in turn should already and automatically cache all directory
It also tries to File::open() a bunch of files that do not exist; for
my version of ITE, that's about 35 files it tries to open but which
don't exist. But (a) the same caching mechanism should apply here,
too, and (b) it seems weird that a mere 35 file open should slow down
the PSP that much. But of course it's not impossible :).
Yotam, can you insert the equivalent of printf's at strategy points of
the PSP code to find out where it takes so long? I imagine that if you
could use a printf statement that just prints __FILE__, __LINE__ and a
millisecond count (e.g. obtained from g_system), and then copy & paste
that all over the SAGA startup code. That way, it should be possible
to pinpoint where exactly the slowness is.
> As for SCI... the problem is that it's using a very complex iterator
> code for the MIDI music, which is most probably what's bringing
> things to a screeching halt. I wanted to rewrite this based on
> Greg's SCI engine (which is doing what the original interpreter
> did), but I simply didn't have enough time these days. I'll look at
> it again towards the weekend.
I don't see how the iterators should contribute to slowness. (Nor do I
find them overly complex, actually, but rather quite elegant, but
that's another matter ;).
More information about the Scummvm-devel