Closed
Bug 1385521
Opened 7 years ago
Closed 7 years ago
nsRange::GetCommonAncestor() is expensive for the obvious case
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
For text controls, the start and end of the container is the same often times, but because the nsContentUtils API doesn't get inlines, nsRange::GetCommonAncestor() shows up in profiles of bug 1346723. GetCommonAncestorInternal() is a template, so we already have two copies of this check: https://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/dom/base/nsContentUtils.cpp#2709. So we may as well inline them in the header to get them to the caller side instead so that we make the common case for these situations faster.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8891597 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Attachment #8891597 -
Flags: review?(amarchesini) → review+
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/76abbe45dd0a Inline the check for common argument in the callers of GetCommonAncestorInternal(); r=baku
Comment 3•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/76abbe45dd0a
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•6 years ago
|
Assignee: nobody → ehsan
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•