#TUNING by stefan
class: Tools::BrowserList
changed: #executeInBackground:
do not create a lot of delay objects
--- a/Tools__BrowserList.st Thu Feb 23 14:16:22 2017 +0100
+++ b/Tools__BrowserList.st Thu Feb 23 14:18:39 2017 +0100
@@ -1457,15 +1457,15 @@
|activeProcess watcher done|
activeProcess := Processor activeProcess.
-
done := false.
watcher :=
[
- |wg|
+ |delay|
+ delay := Delay forSeconds:0.2.
[done] whileFalse:[
- Delay waitForSeconds:0.2.
+ delay wait.
self applicationIsActive ifTrue:[
activeProcess priority:(Processor userSchedulingPriority).
done := true.
@@ -1474,11 +1474,16 @@
] fork.
[
- activeProcess withPriority:(Processor userBackgroundPriority) to:(Processor activePriority) do:aBlock
+ activeProcess
+ withPriority:(Processor userBackgroundPriority)
+ to:(Processor activePriority)
+ do:aBlock
] ensure:[
done := true.
watcher terminate
].
+
+ "Modified: / 23-02-2017 / 13:57:31 / stefan"
!
inSlaveMode