Closed
Bug 1879800
Opened 8 months ago
Closed 8 months ago
Optimize WalkMemoryCacheRunnable's use of nsTArray
Categories
(Core :: Networking: Cache, task, P2)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
124 Branch
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: jstutte, Assigned: jstutte)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
WalkMemoryCacheRunnable
stores a list of cache entries to then walk through it and do mEntryArray.RemoveElementAt(0);
on each iteration. This causes unnecessary memcpy
operations on the array and during filling and on some iterations eventually also realloc
s. We should ensure, that:
- the memory is allocated only once at the beginning for the entire set
- we keep an index for the last run iteration, just nulling out the
RefPtr
without removing the element - the memory is freed only once at the very end of
WalkMemoryCacheRunnable
's lifetime
Assignee | ||
Comment 1•8 months ago
|
||
Updated•8 months ago
|
Assignee: nobody → jstutte
Status: NEW → ASSIGNED
Updated•8 months ago
|
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by jstutte@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0b0f24bc9a21
Avoid WalkMemoryCacheRunnable::mEntryArray to be shifted on each iteration. r=necko-reviewers,valentin
Comment 3•8 months ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
status-firefox124:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•