Large array slows down Squeak

Stefan Matthias Aust sma at 3plus4.de
Thu Jun 1 12:30:47 UTC 2000


At 08:51 31.05.00 -0500, you wrote:

> > And there's another interesting observation.  In Morphic, the delay
> > because of tenuring is much larger than in MVC.  This is probably
> > because Morphic creates much more short-lived object garbage.
>
>Umm, 'splain again why tenuring would make Morphic feel slow?

My guess was that these objects aren't short-lived enough.  If they survive 
one GC, they need to be copied - and this might take quite a few 
milliseconds.  I'd guess that Morphic creates too many Point and Rectangle 
objects just to draw one screen.  And as there are most often stepping 
objects which require continuous screen updates, it will GC quite often.

So perhaps a  "Smalltalk vmParameterAt: 5 put: 10000"  will reduce the 
number of GCs. Could you please explain why increasing this value has problems?

>Creating lots of temporary objects will trigger lots more minor
>GC's which could make it run slower.

Yes, that was my argument.  To prove it, I created a simple test for 
morphic. Without any interaction and just a workspace (and of course my 
InfoStringMorph) open, I get about 2 incremental GCs per second.

Selecting text in the workspace raises the GCs/sec to 25!

If I increment the object count to 10000, I get only 9 GCs/sec when 
selecting text in that same workspace.  I think, this proves that objects 
live too long.  My system spends about 10 milliseconds or 1% of all time in 
GCs per second.  (0.3% if count = 10000)

If I allocate a one-million-elements array, spends about 230 milliseconds 
or 23% of all time in GC per second  (12% if count = 10000)!  This means, 
the incremental GC doesn't scale well at all.


bye
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InfoStringMorph-sma.cs
Type: application/octet-stream
Size: 1455 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000601/790750f7/InfoStringMorph-sma.obj


More information about the Squeak-dev mailing list