AW: [ENH] DefaultProgressBar
Alexander Lazarevic
Alexander at Lazarevic.de
Wed Apr 7 14:05:10 UTC 2004
Yoshiki,
yes I should definitely use the profiler to improve the code that
_really_ takes the most time. See my NewProgressMorph changeset where I
incorporated your tips.
Alex
-----Ursprüngliche Nachricht-----
Von: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] Im Auftrag von
Yoshiki Ohshima
Gesendet: Dienstag, 6. April 2004 21:25
An: The general-purpose Squeak developers list
Betreff: Re: [ENH] DefaultProgressBar
Alex,
> This update should speed things up considerably. I think there is room
> for more, but even than it is hard to beat the MVC progress display by
> speed. That's why I added a preference to switch between morphic and
> mvc style progress display.
If we avoid the Fraction arithmetic, it seems that we can get it twice
as fast.
defaultMorphicAction
| result progress |
progress _ ProgressMorph label: progressTitle.
progress openInWorld.
[result _ workBlock value: [:barVal | progress done: (barVal -
minVal) asFloat / (maxVal - minVal) asFloat]] ensure:
[progress delete].
self resume: result
I guess you can 'cache' ProgressMorph here so that it doesn't get
created every time. (right?)
-- Yoshiki
More information about the Squeak-dev
mailing list
|