Closed
Bug 1374033
Opened 7 years ago
Closed 7 years ago
Optimize EndLimitedIterator::GetNext()
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
I noticed this when profiling Speedometer Preact tests. The bounds check in ElementAt() under GetNext() from <https://searchfox.org/mozilla-central/rev/b95a1a95838cc6e85ea5d9b9e3ae39b4cd69d8ef/dom/base/nsFrameMessageManager.cpp#924> shows up in profiles.
The comment there and the assertions show that the intention was for HasMore() to do the bounds check and not for another one here, but after bug 1159244 landed we forgot about this case and ended up with extra bounds checking. I have a patch to remove this extra cost.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8878865 -
Flags: review?(nfroyd)
Comment 2•7 years ago
|
||
Comment on attachment 8878865 [details] [diff] [review]
Remove double bounds checking from the next accessors of the iterator classes of nsTObserverArray
Review of attachment 8878865 [details] [diff] [review]:
-----------------------------------------------------------------
This shows up in profiles? Ugh.
Attachment #8878865 -
Flags: review?(nfroyd) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b573b3cb047
Remove double bounds checking from the next accessors of the iterator classes of nsTObserverArray; r=froydnj
Comment 4•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•6 years ago
|
Assignee: nobody → ehsan
You need to log in
before you can comment on or make changes to this bug.
Description
•