spun off from bug 159672 --this is probably a minor component to the overall
slowness i see when loading multiple pages as tabs in the background.
0. have the Quartz Debugger on, with "flash screen updates" selected. also, make
sure you have the pref turned on for loading tabs in the background.
1. open a link in a new tab --i used cmd-click.
2. watch as you get two flashes: one for the tab widget being created and
another for when the title in the tab redraws.
when i went over this with simon, he mentioned that more than one flash here
indicated redundant repainting.
yup, i just saw that last week. you can see it even better in jaguar which
paints in red redundant paints.
there is something very weird with our redraw code. not sure if this is related
to our slow redraw perf (redrawing too much area), but it could be.
This is probably only adding to the confusion, but I spent a bit of time running
Quartz Debugger tonight and comparing Mozilla and Chimera (nightly of
2002101804). Chimera is all over the place with redraws compared to Mozilla.
A couple of examples: guaranteed redundant paints (red flashes) whenever you
scroll in small increments (eg. by clicking on scroll arrows, or using a mouse
scroll wheel); and the throbber animation repaints the entire toolbar, not just
i tried some stuff to prevent from drawing the full toolbar when the throbber
updates, but i can't get it to stop. i think it might be a NSToolbar bug but i
haven't coded up a testcase to prove it.
offtopic, but i just verified that the throbber repainting the entire toolbar is
an apple bug. i can duplicate it in a test app that has nothing to do with chimera.
the throbber paint bug has been reported to apple as radar id #3087039
Mike what is the status of radar id #3087039 ?
still true with 2004090408 (v0.8+).
Geoff you might want to look at this.
is this still a problem?
The bug as originally described doesn't appear to happen in the new tab implementation, but loading (or reloading) of a background tab actually causes the whole tab bar to repaint a couple of times, so there is still redundant tab painting happening.
The main cause of what I describe in comment 10 is that either of the following triggers a redraw of the entire tab bar:
- any tab getting a new title
- any tab getting a new icon
The tab code is really convoluted, but it looks like the above could be fixed at a coarse level by replacing BrowserTabViewItem's calls to refreshTabBar: with calls to some new method to refresh just a certain tab or rect.
That won't solve all the drawing issues with the tabs, but it would substantially reduce the insanity as a quick first-pass.
Created attachment 239802 [details] [diff] [review]
Redraw just the tab, rather than the whole bar, when changing the favicon or title. Still not ideal, but a heck of a lot better.
Comment on attachment 239802 [details] [diff] [review]
Checked in on 1.8branch and trunk
"That won't solve all the drawing issues with the tabs, but it would
substantially reduce the insanity as a quick first-pass."
Do we really want to close this out, or leave it open for possible future fixes?
Future improvements could be done in later bugs.