Closed
Bug 1009263
Opened 11 years ago
Closed 11 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•11 years ago
|
||
Assignee | ||
Comment 3•11 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•11 years ago
|
Attachment #8421357 -
Flags: review?(benjamin)
Updated•11 years ago
|
Assignee: mz_mhs-ctb → matspal
Updated•11 years ago
|
Attachment #8421357 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•