Background tasks slow UI?

Martin McClure martin at hand2mouse.com
Sat Sep 15 00:11:10 UTC 2001


>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