[Scummvm-devel] ATTN. Porters. Changed list of files to include
Max Horn
max at quendi.de
Tue Jun 12 10:45:16 CEST 2007
Am 12.06.2007 um 10:31 schrieb Kostas Nakos:
> Lars Persson wrote:
>> I'm just curious if any of the other platforms are seeing any kind of
>> similar problems.
>
> Dictionary loading is pretty rapid in WinCE (without the provided
> patch), with loading times ~5 sec for the 3K line dictionary (120MHz
> ARM). I do get crashes on loading occasionally when loading up the
> dictionary on my ~13MB free ram device, when there are other apps
> running, which I don't like.
>
> To speed up loading and solve the tree memory requirements in one
> go, I
> will take a whack at the following solution later today: We load up
> the
> dictionary with one operation, as Max does. Then, since we've got the
> _sorted_ T9 code in the text file, we use the text file directly to
> perform searches using binary (bisection) search (do away with the
> tree
> altogether). This will require an array with pointers to the
> beginnings
> of lines, so for ~125K dictionary with ~8K lines this will take up:
> 125KB + 4*8K = 157 K. I'm pretty sure the search tree must be
> taking up
> more space than that in memory.
That's fine by me, and in fact very close to the solution I
implemented in "engines/scumm/string.cpp" for the _languageBuffer/
_languageIndex (see loadLanguageBundle). Load pred.dic into a global
buffer, replac some spaces/newlines by zeros here and there, then
keep one big array of pointers pointing to the start of each word.
This saves memory, reduces the number of malloc operations greatly,
and should have a comparable speed.
However, I am deeply concerned that we make such a big change on the
brink of a release. Hence I propose that we delay the release again
until the coming weekend to be able to properly test this.
Bye,
Max
More information about the Scummvm-devel
mailing list