#rehash in ImageSegment

Andreas Raab andreas.raab at gmx.de
Wed Nov 22 20:25:46 UTC 2006


Avi Bryant wrote:
> 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.

It is necessary since the ImageSegment can refer to objects in the image 
(via its outPointers) whose hashes _are_ different. Most importantly 
symbols.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list