Closed Bug 1378537 Opened 7 years ago Closed 7 years ago

Store performance objects in an AutoTArray to speed up marking

Categories

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

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: qdot, Assigned: qdot)

References

Details

Attachments

(1 file)

Right now we store marks/measures in nsTArray, meaning we're allocating per mark/measure. Use AutoTArray to give this a performance bump.
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 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 on attachment 8883736 [details]
Bug 1378537 - Store PerformanceEntry objects in AutoTArray;

https://reviewboard.mozilla.org/r/154646/#review159990
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ee991439579
Store PerformanceEntry objects in AutoTArray; r=smaug
https://hg.mozilla.org/mozilla-central/rev/8ee991439579
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: