Bug Tracker

Opened 10 years ago

Closed 10 years ago

#12727 closed bug (duplicate)

performance regression with comma-separated selectors

Reported by: [email protected] Owned by:
Priority: low Milestone: None
Component: selector Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


There appears to be a performance regression in v1.8.2 with regard to complex comma separated selectors. I've prepared a demo in which such a selector takes 2 orders of magnitude more in v1.8.2 than in v1.7.2 (running into several seconds). See - http://jsfiddle.net/yuvalshirav/y97n9/1/

Change History (1)

comment:1 Changed 10 years ago by timmywil

Component: unfiledselector
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

This is a known regression. On a page with fewer elements, the current implementation is actually faster. The original idea was to remove the need for document sorting. However, given positional selectors and the fact that jQuery.unique is a public method, this wasn't possible so we could switch it back to recursive handling of the selector split by commas and sorted afterwards. We'll see.

Ported to Sizzle issue: https://github.com/jquery/sizzle/issues/164

Note: See TracTickets for help on using tickets.