Closed Bug 164733 Opened 22 years ago Closed 18 years ago

Multiple tabs painted redundantly on background tab load/reload


(Camino Graveyard :: Tabbed Browsing, defect)

Not set


(Not tracked)



(Reporter: bugzilla, Assigned: stuart.morgan+bugzilla)



(Keywords: fixed1.8.1, perf)


(1 file)

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.
Keywords: perf
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.
Target Milestone: --- → Chimera0.6
Depends on: 159672
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
the throbber.
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.
Target Milestone: Chimera0.6 → Chimera0.7
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
Target Milestone: Camino0.7 → Camino0.8
Mike what is the status of radar id #3087039 ?
Target Milestone: Camino0.8 → Camino1.0
still true with 2004090408 (v0.8+).
Geoff you might want to look at this.
is this still a problem?
Target Milestone: Camino1.0 → Camino1.1
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.
QA Contact: bugzilla → tabbed.browsing
Summary: multiple tabs painted redundantly → Multiple tabs painted redundantly on background tab load/reload
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.
Assignee: mikepinkerton → stridey
Attached patch tab-level redrawSplinter 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.
Assignee: stridey → stuart.morgan
Attachment #239802 - Flags: review?
Comment on attachment 239802 [details] [diff] [review]
tab-level redraw

Attachment #239802 - Flags: review? → review+
Attachment #239802 - Flags: superreview?(sfraser_bugs)
Attachment #239802 - Flags: superreview?(sfraser_bugs) → superreview+
Checked in on 1.8branch and trunk
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
"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.
You need to log in before you can comment on or make changes to this bug.