-- 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
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
On 11/22/06, Andreas Raab andreas.raab@gmx.de wrote:
It is necessary since the ImageSegment can refer to objects in the image (via its outPointers) whose hashes _are_ different. Most importantly symbols.
Ah, of course. Thanks.
Avi
squeak-dev@lists.squeakfoundation.org