[Scummvm-devel] RE:Slowww

Max Horn max at quendi.de
Tue Apr 4 17:51:06 CEST 2006

Am 04.04.2006 um 22:20 schrieb Lars Persson:

> Hi!
> 1. Crap hotmail. :-)
> 2. Successfully built Scummvm SVN. It required changes in
> * hashmap.h (public declaration for member vars),

? What changes are needed there, and what errors do they fix, exactly?

> * func.h (hash function declared twice) (as already mentioned like  
> three times),

That should be fixed since I remove the wchar_t line.

> * in scummsys.h (uint is already declared by Symbians libc in  
> types.h (not sure how this this is done on other platforms). Should  
> really the uint,uint32 and int32 datatypes be set based on the  
> presence on config.h or not?

We *can* change this if it is necessary... like to work around bugged  
C libraries (defining types going beyond the standard specs outside  
special namespaces is strictly speaking a bug... and with namespaces  
I also mean "C namespaces", i.e. if a lib needs to define types, it  
should prefix them with some underscores or so).

That's of course only the purist's view. Since you have to work with  
that C lib, obviously we need to work around it anyway :-). I will  
commit a "SCUMMVM_DONT_DEFINE_TYPES" change that will allow you to  
disable the default typedefs, so that your port can provide custom ones.

> So I tested this build on my P910, and there is still quite a long  
> startup phase before the launcher is presented, but might be abit  
> shorter. Also launching games is also abit delayed.

I think those issues are caused by the fact that now we are scanning  
all directories upon startup... on my system, this caused ScummVM to  
take 6-8 secs to launch into a game. Profiling revealed that 98% of  
the time was spent in getcwd which for some reason is very slow on  
Mac OS X. My changes to the FS code brought this down a lot, but  
there are still lots of unnecessary getRoot() calls, I'll try to fix  
that tonight.

Still, if your FS is slow, even with all the optimizations I am  
making to the FS code (it had some really bad bottlenecks, I must  
admit :-), scanning several dirs of your file system can take a long  
time when your FS / device is comparatively slow... we may have to  
reconsider this change.

> But the default SDL main implementation worked without any  
> hitches. :-)

Good :-)


More information about the Scummvm-devel mailing list