Side navigation
#12727 closed bug (duplicate)
Opened October 15, 2012 09:48AM UTC
Closed October 15, 2012 02:00PM UTC
performance regression with comma-separated selectors
Reported by: | yuvalshirav@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | selector | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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/
Attachments (0)
Change History (1)
Changed October 15, 2012 02:00PM UTC by comment:1
component: | unfiled → selector |
---|---|
priority: | undecided → low |
resolution: | → duplicate |
status: | new → closed |
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