Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.300.mcz==================== Summary ====================
Name: Morphic-ar.300
Author: ar
Time: 6 January 2010, 11:00:24 am
UUID: 50a29648-02be-874b-92a2-2f686c103726
Ancestors: Morphic-ar.299
http://bugs.squeak.org/view.php?id=6581Image freezes (background processes like Seaside make no progress) and Squeak hoggs CPU
=============== Diff against Morphic-ar.299 ===============
Item was changed:
----- Method: WorldState>>interCyclePause: (in category 'update cycle') -----
interCyclePause: milliSecs
+ "delay enough that the previous cycle plus the amount of delay will equal milliSecs. If the cycle is already expensive, then no delay occurs. However, if the system is idly waiting for interaction from the user, the method will delay for a proportionally long time and cause the overall CPU usage of Squeak to be low.
+ If the preference #serverMode is enabled, always do a complete delay of 50ms, independant of my argument. This prevents the freezing problem described in Mantis #6581"
- "delay enough that the previous cycle plus the amount of delay will equal milliSecs. If the cycle is already expensive, then no delay occurs. However, if the system is idly waiting for interaction from the user, the method will delay for a proportionally long time and cause the overall CPU usage of Squeak to be low."
| currentTime wait |
+ Preferences serverMode
+ ifFalse: [
+ (lastCycleTime notNil and: [CanSurrenderToOS ~~ false]) ifTrue: [
+ currentTime := Time millisecondClockValue.
+ wait := lastCycleTime + milliSecs - currentTime.
+ (wait > 0 and: [ wait <= milliSecs ] ) ifTrue: [
+ (Delay forMilliseconds: wait) wait ] ] ]
+ ifTrue: [ (Delay forMilliseconds: 50) wait ].
+ lastCycleTime := Time millisecondClockValue.
- (lastCycleTime notNil and: [CanSurrenderToOS ~~ false]) ifTrue: [
- currentTime := Time millisecondClockValue.
- wait := lastCycleTime + milliSecs - currentTime.
- (wait > 0 and: [ wait <= milliSecs ] )
- ifTrue: [
- (Delay forMilliseconds: wait) wait ].
- ].
-
- lastCycleTime := Time millisecondClockValue.
CanSurrenderToOS := true.!
Item was removed:
Item was removed:
Item was removed: