[Newbies] Re: problem with big dictionary

Klaus D. Witzel klaus.witzel at cobss.com
Wed Oct 18 13:45:48 UTC 2006


Hi Petr,

it just passed 1 250 000 here, without the symptoms you describe, on a 1GB  
WinXP notebook.

What platform are you using?

/Klaus

P.S. I always declare temps explicitly in a workspace, I don't like the  
possible surprise and also because I want to see the temps when I  
interrupt the DoIt with alt-.

On Wed, 18 Oct 2006 14:35:42 +0200, Petr Fischer  
<petr.fischer at praguesoft.cz> wrote:

> Hi, what is wrong with this code:
> -----
> cnt := 5000000.
> s := ' jasdfh afhahkjasdf asdf sd'.
> d := Dictionary new: cnt.
> 1 to: cnt do: [ :i |
> 	d at: i put: (i asString, s).
> 	(i \\ 50000 = 0) ifTrue: [ Transcript show: i; cr. ].
> ].
> d size.
> -----
>
> Squeak (latest 3.9) hangs randomly after 600 000 - 1 000 000 iterations
> (about 129MB of RAM [2GB] used before hang).
>
> hang = white squeak window, no interaction possible, 100% of cpu usage
>
> Thanks for suggestions, pf




More information about the Beginners mailing list