Closed Bug 437749 Opened 16 years ago Closed 1 year ago

Excessive repaint in Firefox 3.0 while not in Firefox 2.0

Categories

(Core :: Layout, defect)

x86
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mozbugbox, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: perf, regression, testcase)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a1pre) Gecko/2008060502 Minefield/3.1a1pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a1pre) Gecko/2008060502 Minefield/3.1a1pre

Mouse movement inside the top left canvas is quite slow on FireFox 3 comparing to FireFox 2.0, http://wenq.org/index.cgi?Canvas .

When I run firefox with debug paint on,

  MOZ_DEBUG_PAINTS=1 firefox --no-remote -P wenq 

I can see that when a mouse is moving over the canvas, the whole page was repainted in FF 3.0 while only a little bit unnecessary repaint occurred on FF 2.0. This unconditional repaint will definitely cause a big slow down on the mouse move.



Reproducible: Always
Keywords: regression
Summary: Excessive repaint on Firefox 3.0 while not in Firefox 2.0 → Excessive repaint in Firefox 3.0 while not in Firefox 2.0
Confirming the regression on trunk
Status: UNCONFIRMED → NEW
Component: General → GFX: Thebes
Ever confirmed: true
Keywords: perf
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Attached file reduced testcase
When you mouse over the canvas, a JavaScript function is called to update the mouse position. However, not only the mouse position element is updated, but all the containing div. This only happens if the containing div is floated. The attached testcase tries to reproduce this behavior.

Reporter: if you want to work around this issue in your application, you should look at removing some floats. Removing the float on div.wikiwrapper (wiki2.css) helps, but there may be others because there is still to much repaint afterwards.

Core/GFX Thebes may not be the right place for this, I'm not sure where it should go yet.
Keywords: testcase
I deduced another situation in where extra repaint happens. If a <div> have css dimensions and a table in it, updating the content of one cell will unconditionally update all the cells after it, even if the height and width of the cell did not changed.

Leaving out the dimension of the <div> will have the table only update the changed cell.

Firefox 2 will just update the cell what so ever.

No float property involved in this case.
Component: GFX: Thebes → Layout
QA Contact: thebes → layout
When a form has a <input type="text"/> field in it, it will repaint when something is changed somewhere else in the page.
This page repaint the whole table even though only 1 cell changes. Happens in both firefox 3.0 and 2.0. Hogging CPU like crazy.

http://appledaily.atnext.com/template/apple/sec_main.cfm
Flags: wanted1.9.1?
Flags: wanted1.9.1? → wanted1.9.1+
The invalidate in question comes from http://hg.mozilla.org/mozilla-central/annotate/5088957eb541/layout/generic/nsBlockFrame.cpp#l2319. Apparently, it's including floats in the combined area it's invalidating, which seems wrong.

I have no clue why this isn't triggering in Firefox 2.
Sounds like the non-float testcases are different bugs (that should be filed separately).
Flags: blocking1.9.1?
Blocks: 449919
you can still reproduce this?

I can't using Mozilla/5.0 (Windows NT 6.0; rv:12.0a1) Gecko/20111221 Firefox/12.0a1
QA Whiteboard: qa-not-actionable

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --

Calling WORKSFORME given comment 8 (and my own observations, where I'm not seeing anything that would indicate that paints are happening in inert areas of the viewport on the given testcase).

(Also, the whole paint pipeline is radically different than it was when this bug was filed, particularly with WebRender now.)

I think we can also remove MOZ_DEBUG_PAINTS=1; I'm not sure it does anything useful at this point. I spun off bug 1832692 for that.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: