Closed Bug 631837 Opened 9 years ago Closed 9 years ago

Make querySelector iterate the DOM instead of recursing

Categories

(Core :: DOM: Core & HTML, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

We need to kill off RuleProcessorData first, though.
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Attached patch wip (obsolete) — Splinter Review
Comment on attachment 510046 [details] [diff] [review]
wip

>+    if (!cur->IsNodeOfType(nsINode::eELEMENT)) {

IsElement()? (twice)
Yeah, this code predates IsElement() existing, iirc.  In case it wasn't clear I wrote this months ago, on top of another patch series, and haven't merged it to tip in forever.  It won't apply, it won't compile, and it won't run.  ;)  And I didn't want to spend the time today on making it do any of those things.  But they'll happen!
Attachment #510046 - Attachment is obsolete: true
Whiteboard: [need review]
Comment on attachment 520127 [details] [diff] [review]
Stop doing recursive tree traversal in querySelector(All).

Sweet!
Attachment #520127 - Flags: review?(jonas) → review+
Whiteboard: [need review] → [need bug 598832 fixed]
Pushed http://hg.mozilla.org/mozilla-central/rev/df90f3ca7deb

Either this or bug 598832 or the combination of the two gave us a 20-25% win on dromaeo_css.  ;)
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [need bug 598832 fixed]
Target Milestone: --- → mozilla2.2
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.