[squeak-dev] Lessons learned from (Re: Faster fibonacci)
tim at rowledge.org
Fri Apr 26 20:03:42 UTC 2019
> On 2019-04-25, at 7:40 PM, tim Rowledge <tim at rowledge.org> wrote:
> Looking at FileStream class initialise I see
> addToStartUpList: self after: SecurityManager; "the intent being before: AutoStart"
> and yet inspecting the startuplist shows that FileStream comes well *after* AutoStart (which in a somewhat convoluted way actually makes ProjectLauncher actually do the startup document reading) and so we got things messed up sometime.
It seems all we need is to run
to fix this, at least in a current image.
I'd guess that making sure the order of things in the startup list is correct is something the ReleaseManager ought to be able to do. I would have guessed that it might use SmalltalkImage class>>#initializeStartUpList but can't see a connection in the code right now.
Mind you, that method has a fairly big bug in that it ignores the ordering desires of all the classes involved, which may explain the original problem. We can't simplistically run through the list of classes currently in the startup list and send #initialize to them since any number of them might do much more stuff in those methods, including stuff that could be destructive. We would need to separate out the startup list related code and only run that.
a) in all senders of #addToStartUpList* and related methods, split out the startup list part to an agreed method such as #addToStartUpSequence that handles the ordering requirements, if any. A default nul version inObject would be nice.
b) to rebuild the startup list, take copy of the current list and send each item #addToStartUpSequence
c) some classes may need to be checked out for where they need to be in the ordering - I see thsat ProcessorScheduler is mentioned particularly in SmalltalkImage class>>#initializeStartUpList and yet its #initialize makes no reference to #addToStartUpList*
d) use the rebuilt method from ReleaseBuilder
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Lights are on but nobody's home.
More information about the Squeak-dev