Ticket #8437 (closed bug: wontfix)
Using Multiple Selectors to search by tag name is significantly slower since 1.4.3
| Reported by: | jseger@… | Owned by: | jseger@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | selector | Version: | 1.4.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Starting in jQuery 1.4.3, finding elements using multiple selectors and tag names is dramatically slower (10-30x slower). For example .('input,select') now takes much longer.
See performance tests at: http://jsperf.com/jquery-selector-performance-problems
Change History
comment:1 Changed 2 years ago by rwaldron
- Owner set to jseger@…
- Status changed from new to pending
- Component changed from unfiled to selector
comment:2 Changed 2 years ago by jseger@…
- Status changed from pending to new
Interesting, it seems to perform fine in your test when searching for divs/spans, but it's still slow searching for inputs/selects.
In this version, I took your test, increased the count from 500 to 1000 (to help emphasis the slowness), and repeated all of your tests but searched from 'input,select' instead of 'div,span'.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I'm getting different results with a perf test that we've used on other recent dom traversal/manipulation...
http://jsperf.com/multiple-tag-selector