Real profiling: Why is my UI so slow?

Jerome Peace peace_the_dreamer at
Sun Jan 27 06:07:03 UTC 2008

Real profiling: Why is my UI so slow?

Hi Matthew,

I have seen some interesting problems with the image
and browser speed.
The slowness seems to come when the browser is
updating itself and that can be triggered by other
morphs overlapping (e.g. other browsers).  

See the mantis report:
0002084: Each overlaping browser slows down screen
updates considerably. Caching the image would speed
things up.

This is mostly external observations. At the time I
reported this I hadn't learned to use the tally tools
usefully. (I still haven't. They give too much
information. I want something that will point me
quickly to the culprit.)

My observation is that caching images would be one way
to speed things up. I haven't tried to tackle the
problem directly. (Except to make 3.9 workspaces start
out smaller. The less things overlap the smaller the

Animated morphs are a good way to aggrivate the
problem. By stepping and invalidating their bounds. 

Hmm, I wonder if a one pixel rectangle would be good
for pinpointing the worst update areas?.Invalidate the
rectangle each step. Move it around the screen to see
which pixel causes the greatest slowdown. The step
code could note the clock interval between steps.
Color a map of the screen with the results. 

Alright, we have a crazy idea. Lets see where it gets
us. I'll post something to mantis when it gets


Yours in curiosity and service, --Jerome Peace

>Matthew Fulmer tapplek at 
>Sat Jan 26 06:25:35 UTC 2008 
>Hi all. While playing around with my
DeltaStreamBrowser, I see
>that it takes four seconds for the UI to update after
I click on
>a change. And I have no idea why.
>I've often wondered why the browser is so slow too,
and now I
>have the need to find out. So, How does one go about
>I know about MessageTally and TimeProfileBrowser, but
I've only
>seen them used on well-defined code, not in the wild
in the
>Squeak UI. And I know about world > debug > Message
Tally, but I
>really have no idea what the numbers they report
mean, or what
>to look for in the reports they return, or how to
even know what
>messages were sent while actually processing my click
vs. in
>between while I move the mouse around.
>What I would really like to happen is, I tell squeak:
"Pop-up a
>debugger on the next click". Then, on the next click,
the UI
>process is suspended and shown in a debugger that has
it's own
>private UI loop. Is anything like this possible? I am
sure the
>Morphic event loop was not created without the help
of the
>debugger, but I really have no idea how to trace a UI
event from
>post to screen-update.
>So, that is what I have to work with, and how I don't
know what
>to do with it. So, how do I track down the latency

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.

More information about the Squeak-dev mailing list