Closed
Bug 1332100
Opened 8 years ago
Closed 8 years ago
Intersection observers run too often
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: billm, Assigned: billm)
Details
Attachments
(1 file)
985 bytes,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
Every 100ms or so, we notify intersection observers from the refresh driver. For each document managed by the refresh driver, we dispatch a runnable to do the notification. When a document has lots of frames, this ends up dispatching tons of runnables that never do anything.
Since intersection observers are currently rare, I think the easiest fix is to avoid dispatching if there isn't anything to do. Hopefully this still satisfies the spec.
Attachment #8828127 -
Flags: review?(mstange)
Comment 1•8 years ago
|
||
And if the spec requires this we should file a spec issue to try to fix it.
Comment 2•8 years ago
|
||
Comment on attachment 8828127 [details] [diff] [review]
patch
Review of attachment 8828127 [details] [diff] [review]:
-----------------------------------------------------------------
Seems reasonable. IIRC the spec doesn't require a certain notification latency, so even if this patch made us delay intersection observer notifications in some cases, we'd still be compliant.
Attachment #8828127 -
Flags: review?(mstange) → review+
Pushed by wmccloskey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/46a9096745e7
Check for intersection observers before posting runnable (r=mstange)
This got backed out along with bug 1331804.
Flags: needinfo?(wmccloskey)
Pushed by wmccloskey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/96837f017b83
Check for intersection observers before posting runnable (r=mstange)
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(wmccloskey)
Comment 6•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•