Stef wrote:
>did you notice a different between SystemAnnouncer and replacing it by another 
>one? 

Yes, it made a significant difference. It did not remove enough overhead though.
Job>value: was called over 100K times, doing that only every 100 increments 
helped enough.

Job>>jobAnnouncer 
        ^jobAnnouncer ifNil: [ jobAnnouncer := Announcer new ] 

Job>announce: anAnnouncementClass 
        | announcement | 
        announcement := anAnnouncementClass on: self. 
        self announcer announce: announcement. 

Job>announcer 
        ^Job jobAnnouncer 

SystemProgressMorph>>enable 
        Job jobAnnouncer on: JobStart send: #startJob: to: self. 
        Job jobAnnouncer on: JobEnd send: #endJob: to: self. 
        Job jobAnnouncer on: JobChange send: #updateJob: to: self. 

SystemProgressMorph>>disable 
        Job jobAnnouncer unsubscribe: self. 

Morphic-StephanEggermont.1375.mcz
Kernel-StephanEggermont.1351.mcz

Reply via email to