Closed Bug 1338886 Opened 3 years ago Closed 3 years ago

nsDocument::UpdateIntersectionObservations() should call perf->Now() only if needed

Categories

(Core :: DOM: Core & HTML, defect)

36 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(1 file)

I was profiling something else, and oddly nsDocument::UpdateIntersectionObservations() was there in the profile because of the call to Now().

The method should return early if mIntersectionObservers is empty.
Attached patch update_io.diffSplinter Review
Assignee: nobody → bugs
Attachment #8836460 - Flags: review?(tschneider)
Comment on attachment 8836460 [details] [diff] [review]
update_io.diff

Review of attachment 8836460 [details] [diff] [review]:
-----------------------------------------------------------------

Looking good.
Attachment #8836460 - Flags: review?(tschneider) → review+
Thanks. This isn't anything major, but since I happened to notice this while profiling...
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2f5ea49d65cf
nsDocument::UpdateIntersectionObservations() should call perf->Now() only if needed, r=tschneider
https://hg.mozilla.org/mozilla-central/rev/2f5ea49d65cf
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.