Closed Bug 790205 Opened 12 years ago Closed 12 years ago

browser.newtab.preload=true causes excessive invalidation

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 786484

People

(Reporter: jaws, Unassigned)

Details

(Whiteboard: [Snappy])

Attachments

(1 file, 1 obsolete file)

We can remove the opacity:.3 style on the invalid identity-block icon and replace it with a precomputed translucent icon. This will reduce some extra drawing commands.
We also should move these icons to a single sprite for perf reasons.
Whiteboard: [Snappy]
What kind of drawing commands? What exactly is the overhead and when does it kick in? Let's not micro-optimize at the cost of bloating code and increasing maintenance costs without the wins identified very clearly as being worthwhile.
Bas has a tool that is showing the drawing commands. The opacity of this icon is causing the whole toolbar to be cleared and redrawn when the icon opacity gets applied.
This sounds like a bug. Will bug 539356 fix this? Some other bug that's already filed? It's generally preferable to get the root cause fixed in such cases, as they'll likely affect web content too.
Attached patch Patch (obsolete) — Splinter Review
Bug 539356 may fix it but it's not done yet. I agree that fixing the root cause is preferable, but I'm investigating ways that we can be more optimal given our current environment.
Attachment #660061 - Flags: review?(dao)
(In reply to Jared Wein [:jaws] from comment #5)
> Bug 539356 may fix it but it's not done yet.

AFAIK most parts landed and last I heard it was targeting Firefox 18. It would also be nice to verify whether it does or doesn't fix this, because if it doesn't, we'll need to file a bug on this.
Comment on attachment 660061 [details] [diff] [review]
Patch

(In reply to Jared Wein [:jaws] from comment #3)
> The opacity of this
> icon is causing the whole toolbar to be cleared and redrawn when the icon
> opacity gets applied.

Just tested this via nglayout.debug.paint_flashing and I don't see it.
Attachment #660061 - Flags: review?(dao) → review-
There is an older (Sep 5) build of Bas' paint tool on his people.m.o website (http://people.mozilla.org/~bschouten/player2d.exe). This patch alone might not do the trick, but combined with bug 790225 we believe that it might fix the unnecessary clearing of the toolbars.

Bas says that he can see the extra paint flashing with this patch. We could merge this bug with bug 790225, but I'd like to keep the patches separate.
I mean I don't even see the toolbar being redrawn when the opacity changes without this patch, using the latest nightly.
To see the toolbar being redraw on today's Nightly, do the following:

1) Turn on paint flashing
2) Restore the window (not maximized)
3) Go to about:jared
4) See the toolbars flash
5) Hit CTRL+L to focus the location bar
6) Go to about:dao

Expected:
Only the identity icon and possibly the lucky charms should flicker.

Actual:
Both the tabs and navigation toolbar flicker.
Simpler steps to reproduce:

1) Turn on paint flashing
2) Give focus to the location bar
3) Type one letter to invalidate the address

Without the patch:
The toolbars will flicker.

With the patch:
Only the location bar will change colors.
(In reply to Jared Wein [:jaws] from comment #11)
> Simpler steps to reproduce:
> 
> 1) Turn on paint flashing
> 2) Give focus to the location bar
> 3) Type one letter to invalidate the address
> 
> Without the patch:
> The toolbars will flicker.
> 
> With the patch:
> Only the location bar will change colors.

I used these steps for comment 9. Still can't reproduce. Windows 7, hardware acceleration enabled.
I can make a screencast if you would like. I have force-enabled acceleration and it still happens on Windows 7.
(In reply to Jared Wein [:jaws] from comment #13)
> I can make a screencast if you would like.

Feel free, but this won't really help us move forward. I could make a screencast too :)

We need to somehow figure out what exactly is going wrong on your side. Can you reproduce it in a new profile?
I can't reproduce this with hardware acceleration disabled either.
Nor with a new profile. (The one I used before was mostly virgin anyway, though.)
Assignee: jaws → nobody
Component: Theme → Layout
Product: Firefox → Core
Summary: Replace the opacity styled-invalid identity block icon with a translucent icon → Opacity styled invalid identity block icon causes excessive invalidation
Blocks: 753448
Status: ASSIGNED → NEW
Component: Layout → General
Product: Core → Firefox
Summary: Opacity styled invalid identity block icon causes excessive invalidation → browser.newtab.preload=true causes excessive invalidation
I think we should probably back out bug 753448, since the problem it tries to fix (bug 752839) is already fixed independently by bug 716108.
Attached file IRC log
Attachment #660061 - Attachment is obsolete: true
Please do not morph this bug. Preloading the new tab page is about thumbnail loading, not tab animations.
Please file a new bug.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Summary: browser.newtab.preload=true causes excessive invalidation → Opacity styled invalid identity block icon causes excessive invalidation
This bug has STR and the relevant background information and doesn't serve any other purpose anymore.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Opacity styled invalid identity block icon causes excessive invalidation → browser.newtab.preload=true causes excessive invalidation
No longer blocks: 790203
Oh, there's already bug 786484. Basically the same issue.
No longer blocks: 753448
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: