The Trunk: Morphic-ar.300.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-ar.300.mcz

commits-2
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=6581

Image 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:


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-ar.300.mcz

David T. Lewis
On Wed, Jan 06, 2010 at 10:03:20PM +0000, [hidden email] wrote:
> Andreas Raab uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-ar.300.mcz

> http://bugs.squeak.org/view.php?id=6581
>
> Image freezes (background processes like Seaside make no progress) and Squeak hoggs CPU

This gets the BFAV memorial patch harvest of the day award.
 

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-ar.300.mcz

Andreas.Raab
David T. Lewis wrote:
> On Wed, Jan 06, 2010 at 10:03:20PM +0000, [hidden email] wrote:
>> Andreas Raab uploaded a new version of Morphic to project The Trunk:
>> http://source.squeak.org/trunk/Morphic-ar.300.mcz
>
>> http://bugs.squeak.org/view.php?id=6581
>>
>> Image freezes (background processes like Seaside make no progress) and Squeak hoggs CPU
>
> This gets the BFAV memorial patch harvest of the day award.

Yeah, I had a distinct feeling of déjà vu when I saw it :-)

Cheers,
   - Andreas