Closed Bug 292472 Opened 19 years ago Closed 19 years ago

[FIX]poor performance while mouse is hovered over links in table

Categories

(Core :: DOM: Events, defect, P1)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: tonglebeak, Assigned: bzbarsky)

References

()

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050429 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050429 Firefox/1.0+

On http://www.mozdev.org/projects/active.html, if you hover your mouse over the
table of projects that is listed, the cpu immediately maxes out. While trying to
scroll, the side-effects of the cpu usage is shown by a much slower frame rate
in the scrolling. This only happens while the mouse is hovered inside the table.
Scrolling outside the table is fine.

Possiblity imo is that firefox has trouble handling large tables.

Reproducible: Always

Steps to Reproduce:
1.Go to http://www.mozdev.org/projects/active.html
2.Put mouse in projects table.
3.Try scrolling, or even moving the mouse, and see the cpu maxes out with poor
scrolling performance.
This is one very odd bug, and since the changes in the Coding from the 20th I
would say, it when this all began. So far several issues have been popping up in
the builds after the 22nd, as the 22nds build is mostly good, the help is all I
find to be broken in that one.
changing stye t0 "mozdev.org default 2003" makes the page behave normal again
Version: unspecified → Trunk
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050426
Firefox/1.0+

Happens here, when I wave over the text at the top the cpu jumps but when i
settle the mouse its fine.  it's a little bit worse hovering over the table. 
Weird indeed!

Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
testcase is Valid HTML 4.01 Strict! according to http://validator.w3.org/

1. Load testcase
2. Hover mouse over the table
3. Scroll up and down with your mousewheel

Expected: Table should scroll up and down smoothly
Actual: Table scrolls slowly and jerkly.

Testcase is fast on Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2)
Gecko/20050328 Firefox/1.0+
Testcase is slow on Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2)
Gecko/20050329 Firefox/1.0+

Removing

  <style type="text/css">
    :hover {
    }
  </style>

makes the page scroll smoothly again.

Checkin Range
-
http://tinderbox.mozilla.org/bonsai/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-03-28+06%3A00%3A00&maxdate=2005-03-29+08%3A00%3A00&cvsroot=%2Fcvsroot
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Also, the problem is more obvious with smoothscrolling enabled.
Also, it is possible to observe the bug by moving the mouse over the table and
using up/down arrow keys to scroll the page.
Summary: poor performance while mouse is hovered over table → poor performance while mouse is hovered over links in table
Boris do you have an idea whats going on here?
We have some basic optimizations for :hover.  Specifically, whenever a node
changes :hover state we check whether there are any rules that now apply (or now
don't apply) to the node.  If there are, we reresolve style on that node (and
all its descendants!) so that those rules will be applied.  Note that if a
:hover rule matches the world, then changing hover state on elements close to
the root will happen a lot, with painful consequences.

That said, the table shouldn't be changing :hover state here, but it seems to
be, based on the performance data.  Possible regression from the checkin for bug
284664?  If we're now going from hover on X to hover on null to hover on Y
instead of going directly from hover on X to hover on Y, that could hurt.  See
the FindCommonAncestor() call in SetContentState for hover.
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?
Component: Layout: Tables → DOM: Events
Assignee: nobody → events
QA Contact: layout.tables → ian
Assignee: events → bzbarsky
Status: NEW → ASSIGNED
Attachment #182455 - Flags: superreview?(roc)
Attachment #182455 - Flags: review?(roc)
Attachment #182455 - Flags: superreview?(roc)
Attachment #182455 - Flags: superreview+
Attachment #182455 - Flags: review?(roc)
Attachment #182455 - Flags: review+
Priority: -- → P1
Summary: poor performance while mouse is hovered over links in table → [FIX]poor performance while mouse is hovered over links in table
Target Milestone: --- → mozilla1.8beta2
Comment on attachment 182455 [details] [diff] [review]
This should restore the old behavior

Requesting approval for simple fix to a performance regression.
Attachment #182455 - Flags: approval1.8b2?
Attachment #182455 - Flags: approval1.8b2? → approval1.8b2+
Fixed
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
The improvement at http://www.mozdev.org/projects/active.html is definite - it
now scrolls as smoothly when the mouse is hovering over the table as it does
when the mouse is not.

But the testcase is still slightly jerky. Scrolling up and down with my
mousewheel when the mouse is on the right (not hovering over the table) is very
smooth, whilst scrolling when the mouse is over the table is now slightly jerky.
It's a definite improvement, but I just thought I'd document what I see.
Yeah, the incessant style reresolution there does take its toll...  I'm not sure
what we can do about it, exactly.... :(
As an aside, one of your recent checkins bz (this bug, bug 211128, bug 289156 or
bug 289322) has made scrolling in the extension manager nice and smooth.
That'd be this bug; the others wouldn't have affected scrolling.
Flags: blocking1.8b2?
Flags: blocking1.8b2-
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1+
Blocks: 255824
Blocks: 227260
Depends on: 274736
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: