[squeak-dev] MultiByteFileStream performance issues

tim Rowledge tim at rowledge.org
Fri Jun 13 23:35:45 UTC 2014


The most recent nuScratch beta for the Pi takes a very long time to start up, which is the focus of my work today. 

A moment’s profiling shows that processing the 50 language data files (they’re ‘pootle’ files, apparently) is taking ~27secs on my Pi. ACtually, for 50 files that seemed quite plausible until I checked the old Scratch image- 621mSec. Same files and actually a significantly slower VM. Hmm.

97% of the slow time was in MultiByteFileStream>contentsOfEntireFile, with half spent in #next. By contrast, deliberately using a StandardFileStream took just 300mS. Of course, that means having to manually handle the potential unicode transformations, which is going to be fun. 

Since MultiByteFileStream is the default (see FileStream concreteStream) this may well mean that a lot of time is being wasted when generally loading files. Does MC rely upon the default, for example?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Can't program his way out of a for-loop.




More information about the Squeak-dev mailing list