[squeak-dev] Lessons learned from (Re: Faster fibonacci)

Marcel Taeumel marcel.taeumel at hpi.de
Mon Apr 29 06:40:57 UTC 2019


Hi Tim,

command-line scripts are executed *after* all other start-up calls were made using a deferred UI message. There is no need to fiddle around with the order in the start-up list. See:

SmalltalkImage >> #processStartUpList:
AutoStart class >> #startUp: (last line)
ProjectLauncher >> #startUp
ProjectLauncher >> #startUpAfterLogin

Best,
Marcel

Am 26.04.2019 22:03:54 schrieb tim Rowledge <tim at rowledge.org>:


> On 2019-04-25, at 7:40 PM, tim Rowledge wrote:
>
>
> Looking at FileStream class initialise I see
> Smalltalk
> 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
FileStream initialise
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.

So conceptually,
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

Ideas?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Lights are on but nobody's home.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190429/ddcf730e/attachment.html>


More information about the Squeak-dev mailing list