Closed Bug 1332100 Opened 8 years ago Closed 8 years ago

Intersection observers run too often

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: billm, Assigned: billm)

Details

Attachments

(1 file)

Attached patch patchSplinter 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)
And if the spec requires this we should file a spec issue to try to fix it.
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)
Flags: needinfo?(wmccloskey)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: