Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7568 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Blazing fast two-tiered rewrite of $$

Reported by: savetheclocktower Assigned to: savetheclocktower
Priority: normal Milestone: 1.x
Component: Prototype Version: edge
Severity: normal Keywords: $$ xpath selector discuss
Cc: handcoding

Description

Too much backstory! Read these:

http://www.jackslocum.com/blog/2007/01/11/domquery-css-selector-basic-xpath-implementation-with-benchmarks/

http://blog.dojotoolkit.org/2007/02/04/dojoquery-a-css-query-engine-for-dojo

If this is up your alley, come to the prototype-core mailing list to talk about this. If not, all you really need to know is that this implementation:

* Fixes a major bug in the current $$ (filters out duplicates)

* Uses XPath in Firefox and Opera 9 (really, really fast queries)

* Has faster matching logic than the current $$ on non-XPath-enabled browsers

* Supports a bunch of new selectors (read the test page for some examples)

* Is much lighter than DomQuery or dojo.query and adds only 4K to prototype.js

Performance tests: http://andrewdupont.net/test/double-dollar/

Attachments

selector.new.js (13.2 kB) - added by savetheclocktower on 02/19/07 04:31:23.
Now supports general sibling combinator (~) and most pseudoclasses that take no argument (:first-child, :last-child, :empty, :checked, :enabled, :disabled)

Change History

02/15/07 20:31:46 changed by savetheclocktower

  • keywords changed from $$ xpath selector to $$ xpath selector discuss.

02/19/07 04:31:23 changed by savetheclocktower

  • attachment selector.new.js added.

Now supports general sibling combinator (~) and most pseudoclasses that take no argument (:first-child, :last-child, :empty, :checked, :enabled, :disabled)

02/21/07 03:50:49 changed by savetheclocktower

  • status changed from new to assigned.

Ongoing development on this patch will be done on the new selectors branch. I'll leave this ticket open as a placeholder and a place for discussion.

02/28/07 23:10:16 changed by handcoding

  • cc set to handcoding.

03/10/07 08:10:25 changed by Tobie

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [6366].