Closed
Bug 1488278
Opened 6 years ago
Closed 6 years ago
Add back a cache for IndexOf(childnode)
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox62 | --- | unaffected |
firefox63 | --- | fixed |
firefox64 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
4.80 KB,
patch
|
ehsan.akhgari
:
review+
pascalc
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
When we had child array, even it had a cache for indexing.
https://hg.mozilla.org/mozilla-central/file/ca936adbc565/dom/base/nsAttrAndChildArray.cpp#l41
https://hg.mozilla.org/mozilla-central/file/ca936adbc565/dom/base/nsAttrAndChildArray.cpp#l221
It is based on the educated guess that one accesses usually child nodes close to each others.
CACHE_POINTER_SHIFT is based on some very old data, and should be inreased.
Assignee | ||
Comment 1•6 years ago
|
||
Attachment #9006093 -
Flags: review?(ehsan)
Assignee | ||
Comment 2•6 years ago
|
||
So, in case element has more than couple of child nodes, cache the last result of ComputeIndexOf. This is basically the same what we use to do until recently.
Attachment #9006094 -
Flags: review?(ehsan)
Assignee | ||
Updated•6 years ago
|
Attachment #9006093 -
Flags: review?(ehsan)
Assignee | ||
Updated•6 years ago
|
Attachment #9006093 -
Attachment is obsolete: true
Updated•6 years ago
|
Attachment #9006094 -
Flags: review?(ehsan) → review+
Comment 6•6 years ago
|
||
I removed the remaining code from that in bug 1481501, but it was dead at that point. Bug 651120 is the actual culprit.
Comment 7•6 years ago
|
||
errr...
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44a101e633e0
Add back a cache for IndexOf(childnode), r=ehsan
Updated•6 years ago
|
Keywords: regression
Priority: -- → P2
Comment 9•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee | ||
Comment 10•6 years ago
|
||
Comment on attachment 9006094 [details] [diff] [review]
compute_index_of_cache.diff
Approval Request Comment
[Feature/Bug causing the regression]: bug 651120
[User impact if declined]: jank in worst cases, needed for bug 1483963
[Is this code covered by automated tests?]: This is often used code
[Has the fix been verified in Nightly?]: landed to m-i yesterday
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: bug 1483963 and bug 1488279
[Is the change risky?]: This is adding back similar cache we used to have, but the old cache dealt with an array and this one a list of child nodes, so they are a bit different and different performance characteristics. So, very tiny bit risky from that point of view
[Why is the change risky/not risky?]: see above
[String changes made/needed]: NA
Attachment #9006094 -
Flags: approval-mozilla-beta?
Updated•6 years ago
|
status-firefox62:
--- → unaffected
status-firefox63:
--- → affected
status-firefox-esr60:
--- → unaffected
Comment 11•6 years ago
|
||
This is significantly better than before, but still ~400ms.
Is this just something that we have to live with when there are high numbers of open tabs?
https://perfht.ml/2oGKWtU
Assignee | ||
Comment 12•6 years ago
|
||
I have no idea what that comment is about.
Comment 13•6 years ago
|
||
Sorry, wrong bug.
Comment 14•6 years ago
|
||
Comment on attachment 9006094 [details] [diff] [review]
compute_index_of_cache.diff
Needed to uplift the fix for the regression in bug 1483963, approved for 63 beta
Attachment #9006094 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 15•6 years ago
|
||
bugherder uplift |
You need to log in
before you can comment on or make changes to this bug.
Description
•