[ENH] FasterProperties-nk (saving/loading fixes)
ned at bike-nomad.com
Sat Jan 28 03:57:01 UTC 2012
Please update to this; it fixes project/segment save/load
for backward compatibility.
"Change Set: FasterProperties-nk
Date: 5 August 2002
Author: Ned Konz
NOTE: if you have loaded an earlier version of this change set, please
load the FastPropReverts-nk change set also.
6 Aug: fixed saving/loading
5 Aug (2nd version): fixed at:ifAbsentPut:
5 Aug: fixed copy, added inspect/explore support, removed reverts.
Currently, Morphs can have properties added and removed dynamically.
Their properties are stored in IdentityDictionaries in the Morph
These property dictionaries are typically very small (95% have 4 or less
entries; none has more than 8).
Because of this, using linear searches is considerably faster.
This change set modifies Morph to use MorphProperties instead of
IdentityDictionaries to hold properties. These use Arrays to hold
It will also work with old Morphs that use IdentityDictionaries; no
conversion of Projects, etc. is necessary. IdentityDictionaries will be
converted at project file-in (though unconverted ones work OK too); for
backwards compatibility, projects are written out using
The postscript will convert all existing property dictionaries in
MorphExtensions into OrderedCollections.
In two tests (Dan's browser opening tests and Andreas' menu opening
tests), I got 7% and 12.3% improvement (respectively) from this change
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4707 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120128/4a3a2be0/FasterProperties-nk.cs.obj
More information about the Squeak-dev