[squeak-dev] How can I count redraws of SystemWindows?

Igor Stasenko siguctua at gmail.com
Fri May 2 21:17:21 UTC 2008


Transcript is forcefully redrawn if you issue show: command.
But, if you use just #nextPut:/ #nextPutAll: it will be not redrawn
immediately, only when Transcript window is redrawn in world redraw
cycle.

In previous posts to squeak-dev, i already highlighted this issue.
There is no real need in updating Transcript window more often than
each 20ms (which is a hard-coded world update cycle). And #show:
command should not forcefully redraw window, just invalidate it , so
on next cycle window will be updated automatically.

The only reason, why this bad habit is still present in image, because
there are many applications which working in single-threaded manner,
by locking UI, preventing it to update regularly, and as consequence
you need to update things manually instead of letting world update
cycle update it automatically.
Some people advocating, that direct redraw of Transcript window each
time you invoking #show: letting user to see message immediately.
But, if you do not lock UI process with own lengthly process, which
preventing updates each 20ms, what difference then? Do you really
think you will notice 20ms delay?
Also consider putting single character in transcript 1000 times in a
row. Is there a real need to redraw Transcript each time for each
character?

2008/5/2 Matthias Berth <matthias.berth at googlemail.com>:
> Hello,
>
>
>  I am trying to find out why browsers get slower when you open more of
>  them in Squeak 3.9 (see previous emails). One theory is that hidden
>  browsers are redrawn. I'd like to test that by making a note on the
>  Transcript every time a browser window gets redrawn. I have tried to
>  override SystemWindow>>fullRedrawOn: aCanvas. Unfortunately, the image
>  locks up when I try to accept a non-trivial variation. I have tried
>  e.g.
>
>  fullDrawOn: aCanvas
>   super fullDrawOn: aCanvas
>   self title. "Hangs."
>
>  Sometimes I am able to accept more complicated variants of this, but
>  invariably I ended up with a hanging mage. I have tried to write to
>  transcript only if I am inside certain type of window, in order to
>  avoid redrawing loops for the transcript window. That failed because I
>  ws not able to accept these variants of fullDrawOn:.
>
>  Anything else I can try to count redraws?
>
>  Cheers
>
>  Matthias
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list