Store performance objects in an AutoTArray to speed up marking

RESOLVED FIXED in Firefox 56

Status

()

Core
DOM
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: qdot, Assigned: qdot)

Tracking

(Blocks: 1 bug)

unspecified
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Right now we store marks/measures in nsTArray, meaning we're allocating per mark/measure. Use AutoTArray to give this a performance bump.
Comment hidden (mozreview-request)

Comment 2

8 months ago
mozreview-review
Comment on attachment 8883736 [details]
Bug 1378537 - Store PerformanceEntry objects in AutoTArray;

https://reviewboard.mozilla.org/r/154646/#review159896

Arrays are quite large, but at least they are per document only.
Attachment #8883736 - Flags: review?(bugs) → review+

Comment 3

8 months ago
mozreview-review
Comment on attachment 8883736 [details]
Bug 1378537 - Store PerformanceEntry objects in AutoTArray;

https://reviewboard.mozilla.org/r/154646/#review159898

::: dom/performance/Performance.h:155
(Diff revision 1)
>    DOMHighResTimeStamp RoundTime(double aTime) const;
>  
>    nsTObserverArray<PerformanceObserver*> mObservers;
>  
>  private:
> -  nsTArray<RefPtr<PerformanceEntry>> mUserEntries;
> +  static const uint64_t kDefaultResourceTimingBufferSize = 150;

Could you add a comment somewhere here that if and when the limit is increased, this code should probably move to use SegmentedVector
Comment hidden (mozreview-request)

Comment 6

8 months ago
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ee991439579
Store PerformanceEntry objects in AutoTArray; r=smaug

Comment 7

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8ee991439579
Status: NEW → RESOLVED
Last Resolved: 8 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.