2017-04-12 10:55 GMT+02:00 Guillermo Polito <guillermopol...@gmail.com>:
> PharoClassInstaller>>migrateClasses: old to: new using: >> anInstanceModification >> instanceModification := anInstanceModification. >> old ifEmpty: [ ^ self ]. >> [ >> 1 to: old size do: [ :index | >> self updateClass: (old at: index) to: (new at: index)]. >> old elementsForwardIdentityTo: new. >> " Garbage collect away the zombie instances left behind in garbage memory >> in #updateInstancesFrom: " >> " If we don't clean up this garbage, a second update would revive them >> with a wrong layout! " >> " (newClass rather than oldClass, since they are now both newClass) " >> Smalltalk garbageCollect. >> ] valueUnpreemptively >> >> Commenting garbage collection here increases performance 10 times. >> Then commenting class update loop increases performance 3 times more. But >> this loop is required. It adopts all instances of old class to new one. And >> time here spent in #allInstances method. >> >> Can we remove manual garbage collection here? Why it is needed? >> > > Well, there is the comment that explains it and makes pretty good sense. > But is does not explain why these bad zombies exist. We investigates possible reasons and could not reproduce them. We will try remove garbage collection here in Pharo 7