зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1385369 - Reserve 1 space in Selection::mRanges; r=qdot
Most selections on the Web end up with one Range inside them. By reserving the space for this one range inline, we can avoid the allocator pressure in a lot of hot code when manipulating the Selection object.
This commit is contained in:
Родитель
540442244f
Коммит
8e7275d330
|
@ -437,7 +437,7 @@ private:
|
|||
// proves to be a performance concern, then an interval tree may be a
|
||||
// possible solution, allowing the calculation of the overlap interval in
|
||||
// O(log n) time, though this would require rebalancing and other overhead.
|
||||
nsTArray<RangeData> mRanges;
|
||||
AutoTArray<RangeData, 1> mRanges;
|
||||
|
||||
RefPtr<nsRange> mAnchorFocusRange;
|
||||
RefPtr<nsFrameSelection> mFrameSelection;
|
||||
|
|
Загрузка…
Ссылка в новой задаче