зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1378537 - Store PerformanceEntry objects in AutoTArray; r=smaug
Storing PerformanceEntry objects in an AutoTArray (currently sized to match our limit for resource timing entries) should omit some per-entry allocations and give us a small speedup with creating entries in tight loops. MozReview-Commit-ID: LNgVhMn461g --HG-- extra : rebase_source : 10250c2fad5ebaf0e89bf9759d157b7d1d855ffa
This commit is contained in:
Родитель
c0cd581fab
Коммит
37abc6d73b
|
@ -152,11 +152,14 @@ protected:
|
|||
nsTObserverArray<PerformanceObserver*> mObservers;
|
||||
|
||||
private:
|
||||
nsTArray<RefPtr<PerformanceEntry>> mUserEntries;
|
||||
nsTArray<RefPtr<PerformanceEntry>> mResourceEntries;
|
||||
static const uint64_t kDefaultResourceTimingBufferSize = 150;
|
||||
|
||||
// When kDefaultResourceTimingBufferSize is increased or removed, these should
|
||||
// be changed to use SegmentedVector
|
||||
AutoTArray<RefPtr<PerformanceEntry>, kDefaultResourceTimingBufferSize> mUserEntries;
|
||||
AutoTArray<RefPtr<PerformanceEntry>, kDefaultResourceTimingBufferSize> mResourceEntries;
|
||||
|
||||
uint64_t mResourceTimingBufferSize;
|
||||
static const uint64_t kDefaultResourceTimingBufferSize = 150;
|
||||
bool mPendingNotificationObserversTask;
|
||||
|
||||
RefPtr<PerformanceService> mPerformanceService;
|
||||
|
|
Загрузка…
Ссылка в новой задаче