Bug Tracker

Modify

Ticket #8024 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Sizzle Performance Regression

Reported by: rwaldron Owned by:
Priority: blocker Milestone: 1.5
Component: selector Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Change History

comment:1 Changed 3 years ago by jitter

That sounds strange to me as 1.4.3 specifically included an update to Sizzle to improve the performance of element rooted queries. Also the  blog post on the 1.4.3 release documents  improvements on the performance of .find

Version 0, edited 3 years ago by jitter (next)

comment:3 Changed 3 years ago by danheberden

  • Status changed from new to closed
  • Resolution set to fixed

comment:4 Changed 3 years ago by john

  • Priority changed from undecided to blocker
  • Component changed from unfiled to selector
  • Milestone changed from 1.next to 1.5

So yeah - this was from moving to using qSA in jQuery 1.4.3. qSA(".class") is slower than doing getElementsByClassName("class") (which is what Sizzle would use internally). Amusingly the case of jQuery(".class") would/has been always using qSA if possible so that would've been "slow" for them as well.

I've moved some perf improvements from jQuery into Sizzle and added a ".class" check and quickly use getElementsByClassName if it exists. This will help to make the code faster in all browsers (and for other projects that use Sizzle).

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.