#rehash in ImageSegment

Avi Bryant avi.bryant at gmail.com
Wed Nov 22 20:18:31 UTC 2006


--
restoreEndianness
	"Fix endianness (byte order) of any objects not already fixed.  Do
this by discovering classes that need a startUp message sent to each
instance, and sending it.
	I have just been brought in and converted to live objects.  Find all
Sets and Dictionaries in the newly created objects and rehash them.
--

Can anyone explain to me why we need to rehash all sets when loading
in an ImageSegment?  The #identityHash of objects is preserved, and
presumably any other #hash function will also be ok.  The fact that
this happens in #restoreEndianness makes me think that maybe the
#identityHash changes if you move a segment between architectures, but
I haven't tested that.  At any rate it seems odd to do it
unconditionally, since this often seems to be a major percentage of
the load time for an image segment.

Avi



More information about the Squeak-dev mailing list