Open
Bug 1926662
Opened 1 year ago
Updated 1 year ago
Instrument nsTArray to help with optimization
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: jesup, Unassigned)
Details
We should consider modifying nsTArray to record in a hashtable keyed by file/line# containing:
a) how many are created,
b) how many exist at once (optional),
c) max size distribution (or at least average size) (note, not destruction size)
Then dump the hashtable at shutdown.
This can be used for finding 'hot' nsTArrays, and also good sizes for AutoTArrays or initial array sizes/SetCapacity to reduce allocation traffic.
This could be optionally compiled in as needed once in a while to run a check. (#ifdef TARRAY_STATS)
You need to log in
before you can comment on or make changes to this bug.
Description
•