[Pharo-dev] [bloc] shape size?

Henrik Nergaard henrik.nergaard at uia.no
Sun Apr 3 15:51:05 EDT 2016


>A FTTableContainerMorph recreates all its submorphs on every drawOn:. 
Not correct.

Submorphs are only recreated when the view of the list has changed #canRefreshValues, ie if the variable "needsRefreshExposedRows" is set to true.  If this is false nothing will happen in #drawOn: 

If changes is necessary the drawOn: will recreate submorphs for the current view (showIndex) and set the "needsRefreshedExposedRows" to false signalling that it is correctly laid out.


Best regards,
Henrik


-----Original Message-----
From: Pharo-dev [mailto:pharo-dev-bounces at lists.pharo.org] On Behalf Of Thierry Goubier
Sent: Sunday, April 3, 2016 9:32 PM
To: Pharo Development List <pharo-dev at lists.pharo.org>
Subject: Re: [Pharo-dev] [bloc] shape size?

I think FastTable is something you should have a look at. Esteban did something really interesting there.

In FT, Submorphs are only created when they are about to be displayed: 
Pharo can easily create hundreds of morphs on every redraw cycle. So FT performance is O(k) where k is the number of rows to display on screen (typical k is ~25), and is O(1) regarding the length of the list
(almost: there is a point, for very large tree-like structures, where just iterating over the structure becomes the main performance
limitation: see FTTree).

A FTTableContainerMorph recreates all its submorphs on every drawOn:. 
I've played with different variants (do not recreate all submorphs, for
example) but you don't see any performance difference (on the time needed for a drawOn:).

Regards,

Thierry



More information about the Pharo-dev mailing list