The Trunk: Monticello-ar.334.mcz

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

The Trunk: Monticello-ar.334.mcz

commits-2
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.334.mcz

==================== Summary ====================

Name: Monticello-ar.334
Author: ar
Time: 10 December 2009, 12:42:59 pm
UUID: 4a73ef6b-47d1-9b44-b744-e5b9e3071518
Ancestors: Monticello-ar.333

A little white lie: When loading sizable packages, most of the time can be spent in notifying the observers. Tell the users that we're still installing because it's embarrassing to let them know that we're wasting our time in notifications.

=============== Diff against Monticello-ar.333 ===============

Item was changed:
  ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
  basicLoad
  errorDefinitions := OrderedCollection new.
  [["Pass 1: Load everything but the methods,  which are collected in methodAdditions."
  additions do: [:ea |
  [ea isMethodDefinition
  ifTrue:[methodAdditions add: ea asMethodAddition]
  ifFalse:[ea load]]on: Error do: [errorDefinitions add: ea].
  ] displayingProgress: 'Reshaping classes...'.
 
  "Pass 2: We compile new / changed methods"
  methodAdditions do:[:ea| ea createCompiledMethod] displayingProgress: 'Compiling...'.
 
  'Installing...' displayProgressAt: Sensor cursorPoint from: 0 to: 2 during:[:bar|
  "There is progress *during* installation since a progress bar update
  will redraw the world and potentially call methods that we're just trying to install."
  bar value: 1.
 
  "Pass 3: Install the new / changed methods
  (this is a separate pass to allow compiler changes to be loaded)"
  methodAdditions do:[:ea| ea installMethod].
 
  "Pass 4: Remove the obsolete methods"
  removals do:[:ea| ea unload].
  ].
 
  "Try again any delayed definitions"
  self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
  errorDefinitions do: [:ea | ea load] displayingProgress: 'Reloading...'.
 
  "Finally, notify observers for the method additions"
+ methodAdditions do: [:each | each notifyObservers]
+ "the message is fake but actually telling people how much time we spend
+ in the notifications is embarrassing so lie instead"
+ displayingProgress: 'Installing...'.
- methodAdditions do: [:each | each notifyObservers].
 
  additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)] displayingProgress: 'Initializing...'
  ] on: InMidstOfFileinNotification do: [:n | n resume: true]
  ] ensure: [self flushChangesFile]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-ar.334.mcz

Eliot Miranda-2
or you might borrow a line from Apple.  Their installer says "Optimizing system performance..." once it gets to the last phase ;)

On Thu, Dec 10, 2009 at 12:43 AM, <[hidden email]> wrote:
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.334.mcz

==================== Summary ====================

Name: Monticello-ar.334
Author: ar
Time: 10 December 2009, 12:42:59 pm
UUID: 4a73ef6b-47d1-9b44-b744-e5b9e3071518
Ancestors: Monticello-ar.333

A little white lie: When loading sizable packages, most of the time can be spent in notifying the observers. Tell the users that we're still installing because it's embarrassing to let them know that we're wasting our time in notifications.

=============== Diff against Monticello-ar.333 ===============

Item was changed:
 ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
 basicLoad
       errorDefinitions := OrderedCollection new.
       [["Pass 1: Load everything but the methods,  which are collected in methodAdditions."
       additions do: [:ea |
               [ea isMethodDefinition
                       ifTrue:[methodAdditions add: ea asMethodAddition]
                       ifFalse:[ea load]]on: Error do: [errorDefinitions add: ea].
       ] displayingProgress: 'Reshaping classes...'.

       "Pass 2: We compile new / changed methods"
       methodAdditions do:[:ea| ea createCompiledMethod] displayingProgress: 'Compiling...'.

       'Installing...' displayProgressAt: Sensor cursorPoint from: 0 to: 2 during:[:bar|
               "There is progress *during* installation since a progress bar update
               will redraw the world and potentially call methods that we're just trying to install."
               bar value: 1.

               "Pass 3: Install the new / changed methods
               (this is a separate pass to allow compiler changes to be loaded)"
               methodAdditions do:[:ea| ea installMethod].

               "Pass 4: Remove the obsolete methods"
               removals do:[:ea| ea unload].
       ].

       "Try again any delayed definitions"
       self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
       errorDefinitions do: [:ea | ea load] displayingProgress: 'Reloading...'.

       "Finally, notify observers for the method additions"
+       methodAdditions do: [:each | each notifyObservers]
+               "the message is fake but actually telling people how much time we spend
+               in the notifications is embarrassing so lie instead"
+               displayingProgress: 'Installing...'.
-       methodAdditions do: [:each | each notifyObservers].

       additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)] displayingProgress: 'Initializing...'
       ] on: InMidstOfFileinNotification do: [:n | n resume: true]
       ] ensure: [self flushChangesFile]!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-ar.334.mcz

Igor Stasenko
2009/12/10 Eliot Miranda <[hidden email]>:
> or you might borrow a line from Apple.  Their installer says "Optimizing
> system performance..." once it gets to the last phase ;)
>

Why not saying the truth?

'Notifying system about changes...'

--
Best regards,
Igor Stasenko AKA sig.