Closed
Bug 1257207
Opened 8 years ago
Closed 8 years ago
Increase ATOM_HASHTABLE_INITIAL_LENGTH
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file)
1.09 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
The atom table very quickly gets 10,000+ entries in it (or even 100,000+), so the current value of 2048 for ATOM_HASHTABLE_INITIAL_LENGTH is too low. Choosing a better value has some subtleties: we add ~2700 static atoms to the table at start-up, and then we start adding and removing dynamic atoms. If we make the table too big to start with, when the first dynamic atom gets removed the load factor will be < 25% and so we will shrink it to 4096 entries. By choosing an initial length of 4096, we get an initial capacity of 8192. That's the biggest initial capacity that will let us be > 25% full when the first dynamic atom is removed (when the count is ~2700), thus avoiding any shrinking.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8731274 -
Flags: review?(nfroyd)
Assignee | ||
Updated•8 years ago
|
Comment 2•8 years ago
|
||
Comment on attachment 8731274 [details] [diff] [review] Increase ATOM_HASHTABLE_INITIAL_LENGTH Review of attachment 8731274 [details] [diff] [review]: ----------------------------------------------------------------- Maybe turn comment 0 into an actual comment as a rationale for the particular size chosen here?
Attachment #8731274 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c617aafb0e961fb863d3a5222dbca082a6a9c3b5 Bug 1257207 - Increase ATOM_HASHTABLE_INITIAL_LENGTH. r=froydnj.
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c617aafb0e96
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•