pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[Memory] commentSourcePointer is not needed for MetaClasses

Open MarcusDenker opened this issue 3 years ago • 3 comments

Bug description the source pointer to comments is stored in ClassOrganization. Now both the class and the metaclass have a ClassOrganization instance, but the source pointer for the comment is only needed once.

Why is this a problem? It is not a severe problem (else this would have already been fixed a loooong time ago). But it wastes a little bit of memory. (just some ~75Kb in the current Pharo10).

What needs to be done The reason why this is stored in the ClassOrganization is just that it was too hard to change Class itself without the bootstrap way back when it was added (ST80 did not save class comments in the .sources/changes).

That means: we just need to move the commentSourcePointer to Class, then MetaClass will not waste space with it anymore,

MarcusDenker avatar Feb 28 '22 21:02 MarcusDenker

Yes!

Ducasse avatar Mar 01 '22 07:03 Ducasse

Cool!

Yes bootstrap allows for things that would not have been possible back at the time in Squeak. Pharo rocks!

astares avatar Mar 02 '22 15:03 astares

merged https://github.com/pharo-project/pharo/pull/11449

MarcusDenker avatar Jul 12 '22 07:07 MarcusDenker

merged!

MarcusDenker avatar Mar 31 '23 09:03 MarcusDenker