Closed
Bug 335733
Opened 18 years ago
Closed 18 years ago
FindChildWithRules should use an MRU cache
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Whiteboard: [patch])
Attachments
(1 file)
7.90 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
There's currently no good reason for nsStyleContext's child lists to be doubly linked. Furthermore, making them singly linked would force insertion at the beginning of the list, which would make the optimization in FindChildWithRules considerably more useful, I suspect, since it would look at the 10 most recently created children instead of the 10 least. FindChildWithRules could even promote to the beginning of the list (and could also not have duplicated code for the two child lists).
Assignee | ||
Comment 1•18 years ago
|
||
Well, maybe not -- I wasn't thinking about RemoveChild. But I'd still like to make FindChildWithRules more effective...
Summary: nsStyleContext child list should be singly linked → FindChildWithRules should use an MRU cache
Assignee | ||
Comment 2•18 years ago
|
||
Not yet tested.
Assignee | ||
Comment 3•18 years ago
|
||
Comment on attachment 220064 [details] [diff] [review] patch This also condenses a bunch of things that operate either on mChild or mEmptyChild.
Attachment #220064 -
Flags: superreview?(bzbarsky)
Attachment #220064 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9alpha
Updated•18 years ago
|
Attachment #220064 -
Flags: superreview?(bzbarsky)
Attachment #220064 -
Flags: superreview+
Attachment #220064 -
Flags: review?(bzbarsky)
Attachment #220064 -
Flags: review+
Assignee | ||
Comment 4•18 years ago
|
||
Fix checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•