Closed Bug 386123 Opened 17 years ago Closed 17 years ago

[FIX]Reduce selector allocations

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

(Keywords: perf)

Attachments

(1 file)

I was looking at the memory log linked to from http://dbaron.org/log/2007-06#e20070621a and it seems to me that a number of the allocations we do when cloning selectors (basically any time the selector is more than just a tag selector) can be avoided by not having to clone selectors during parsing.

Patch to that effect coming up; I'd be kind of interested in its impact, if any.  I haven't run any correctness tests on it yet, unfortunately...
Attachment #270097 - Flags: superreview?(dbaron)
Attachment #270097 - Flags: review?(dbaron)
Though maybe it would be clearer to put the forget() at the callsites and make the method just take an nsCSSSelector*.
Comment on attachment 270097 [details] [diff] [review]
Something like this

r+sr=dbaron
Attachment #270097 - Flags: superreview?(dbaron)
Attachment #270097 - Flags: superreview+
Attachment #270097 - Flags: review?(dbaron)
Attachment #270097 - Flags: review+
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: