Background tasks slow UI?

danielv at netvision.net.il danielv at netvision.net.il
Sun Sep 16 03:00:52 UTC 2001


What you're saying is imprecise - high priority tasks in Squeak do
preempt lower priority tasks. 

Note that I reported slowness, not a freeze, and the testSuite never
yields.

The question is why they aren't preempting with more vigor in this
case...

Now the plot thickens - after turning on the higherPerformance
preference, running a test in thee backgroup actually makes my framerate
go *higher* - around 100 when I have nothing other than the UI, 300 with
the test, 150 with the test and a ProcessBrowser showing me that the
test is really running...

Hmmm... Huh?

Martin McClure <martin at hand2mouse.com> wrote:
> >The RB tests take lots of time to run, so I made the SUnit TestRunner
> >run tests in the background.
> >I did this using the code -
> >
> >runTests
> >         self runWindow.
> >        [result _ self suite run.
> >        WorldState addDeferredUIMessage: [self updateWindow: result. self
> >beep]] forkAt: Processor userBackgroundPriority.
> >
> >This was simple, and worked, except that my framerate dropped from the
> >maximal ~50 to ~1, with update times hovering between 900 and 1500
> >mSecs.
> >
> >Any ideas why? I'd expect things running in the background not to affect
> >my framerate, or at least not beyond some user settable threshold (25
> >frames/sec).
> 
> How often does the test suite do a Processer yield? Since Squeak 
> Processes are not preemptive, you need to regularly yield in order 
> for the priority system to mean much.
> 
> -Martin




More information about the Squeak-dev mailing list