Closed Bug 907 Opened 26 years ago Closed 26 years ago

Too many Selector and SelectorList

Categories

(Core :: CSS Parsing and Computation, defect, P2)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: troy, Assigned: peterl-retired)

Details

There are too many temporary Selector and SelectorList objects created and destroyed during the load of a document. In the case of demo1, Purify reports 468 Selector objects and 174 SelectorList objects. See CSSParserImpl::ParseSelectorGroup(), CSSParserImpl::ParseRuleSet(), and CSSParserImpl::ParseSelectorList()
Because each Selector object has an embedded nsString object which allocates space from the heap we end up with a lot of temporary nsString objects as well...
Because the SelectorList object uses a nsVoidArray object to manage the Selector objects and nsVoidArray allocates space for its dynamic array, we end up with more heap allocation/deallocation
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
SelectorLists are now lighter and only created as needed. Selectors are gone. Poof! (We now go directly to nsCSSSelectors which are permanent storage and don't use nsStrings)
QA Contact: 3825
set qa contact to troy@netscape.com for verify
Troy you will need to provide a test case for verification
still waiting for troy@netscape.com to do 1 of the following: 1) provide QA with a test case so we can mark it VERIFIED_FIXED 2) verify it himself and mark this bug VERIFIED-FIXED
Status: RESOLVED → VERIFIED
marking verified per reporter
You need to log in before you can comment on or make changes to this bug.