Closed
Bug 1009263
Opened 10 years ago
Closed 10 years ago
nsCheapSet needs an efficient method for removing all entries
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
Attachments
(1 file)
1.04 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
The only way to remove all entries today is to call EnumerateEntries and return PL_DHASH_REMOVE, which isn't efficient, and it also wastes memory by retaining the internal hashtable so it fails to deliver on its promise in the documentation that claims: * A set that takes up minimal size when there are 0 or 1 entries in the set.
Think I might work on this, if you weren't planning to.
Assignee: nobody → mz_mhs-ctb
Assignee | ||
Comment 2•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=9ab404087e6e
Assignee | ||
Comment 3•10 years ago
|
||
Thanks, but I think the code that's already there in the destructor might work as is, just needed to set mState = ZERO at the end.
Assignee | ||
Updated•10 years ago
|
Attachment #8421357 -
Flags: review?(benjamin)
Updated•10 years ago
|
Assignee: mz_mhs-ctb → matspal
Updated•10 years ago
|
Attachment #8421357 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/833768f88824
https://hg.mozilla.org/mozilla-central/rev/833768f88824
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•