Closed
Bug 697931
Opened 13 years ago
Closed 13 years ago
Remove KidHashes when possible
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: [MemShrink])
Attachments
(1 file)
4.12 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Looking at Gmail and TechCrunch I see that 13% of all KidHashes contain 0 or
1 elements. (If you weight KidHashes by their capacity, it's about 10% of
the space used by KidsHash entries.) This can happen because
Shape::removeChild() does not convert HASH form KidsPointers back to SHAPE
form when possible.
This patch implements the conversion. This saves roughly 30--40KB for a
page like Gmail. It also adds capacity() to Hash{Table,Map,Set}, which
aren't used in the patch but I used them for measurement and they seem like
useful additions in general.
Attachment #570177 -
Flags: review?(luke)
![]() |
Assignee | |
Updated•13 years ago
|
Whiteboard: [MemShrink]
![]() |
||
Comment 1•13 years ago
|
||
Comment on attachment 570177 [details] [diff] [review]
patch
Looks reasonable. I was initially worried about thrashing back 'n forth but then I remembered that Shape::removeChild is only called from GC.
Attachment #570177 -
Flags: review?(luke) → review+
![]() |
Assignee | |
Comment 2•13 years ago
|
||
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Comment 4•13 years ago
|
||
Thanks, njn -- I should have caught this transition and covered it in the landing last summer.
/be
You need to log in
before you can comment on or make changes to this bug.
Description
•