[squeak-dev] [Vm-dev] The Trunk: System-codefrau.1205.mcz
David T. Lewis
lewis at mail.msen.com
Sun Jan 3 16:11:43 UTC 2021
On Sat, Jan 02, 2021 at 02:56:49PM -0500, David T. Lewis wrote:
> Hi Eliot,
>
> On Sat, Jan 02, 2021 at 11:10:45AM -0800, Eliot Miranda wrote:
> >
> >
> > > On Jan 2, 2021, at 8:41 AM, David T. Lewis <lewis at mail.msen.com> wrote:
> > >
> > > ???Hi Vanessa,
> > >
> > >> On Fri, Jan 01, 2021 at 09:28:35PM -0800, Vanessa Freudenberg wrote:
> > >> Hi Dave,
> > >>
> > >> I haven???t actually tried it but it seems on a slow platform this would
> > >> delay the first-time startup by however long those benchmarks take, right?
> > >>
> > >
> > > No, it would run at most one time per session, and then only if someone
> > > sends #isLowerPerformance. I think thas means it would affect the run time
> > > of the first unit test that someone runs after starting the image, but
> > > otherwise no impact. Certainly it would not be noticable to humans.
> >
> > David, put this delay in every startup and use Squeak as a scripting
> > language and apply the script to every file in your home directory and
> > yes, it would be noticeable to humans.
> >
>
> I does *not* do that. Apparently I am not doing a good job of explaining.
>
>
Regarding startup time, I'm afraid that my explanation did not come across
well in email, and I apologize for not being clear.
Let me try once more by just quoting the code. At startup time, there is
a new class var SlowPlatform that is set to nil. Otherwise nothing new
is done during image startup processing:
SmalltalkImage>>startUp: resuming
resuming ifTrue:
[LastStats := nil.
SlowPlatform := nil.
SystemChangeNotifier uniqueInstance notify: Smalltalk ofAllSystemChangesUsing: #event:]
Later on, the class var is lazy initialized if and only if someone needs
to check for isLowerPerformance:
SmalltalkImage>>isLowerPerformance
"Some operations - TestCases for example - need an idea of the typical performance
of the system on which they are being performed."
^ SlowPlatform
ifNil: [ SlowPlatform := (Time millisecondsToRun:[ 25 benchFib ]) > 200
or: [ (Time millisecondsToRun: [ 64 benchmark ]) > 200 ]]
That's all I meant to suggest.
Sorry for the confusion,
Dave
More information about the Squeak-dev
mailing list
|