Ticket #8561 (closed bug: duplicate)
Very Slow IE Multiple Selector performance on big html page
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | unfiled | Version: | 1.5.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
This occurs on a rather big html page: 150kBytes and more than 700 "input, select, td and textarea" objects. Using IE6 or IE8, the unresponsive-script popup appears. The bug existed in jQuery 1.4.4 too.
Example code slow statement:
anchor.find("input,select,td,textarea");
Same effect but now fast:
anchor.find("input"); anchor.find("select"); anchor.find("td"); anchor.find("textarea");
"Workaround", actual code:
if ($.browser.msie) {
form.find("input").tooltip(); form.find("select").tooltip(); form.find("td").tooltip(); form.find("textarea").tooltip();
} else {
form.find("input,select,td,textarea").tooltip();
}
Change History
comment:1 Changed 2 years ago by addyosmani
- Owner set to anonymous
- Status changed from new to pending
comment:2 follow-up: ↓ 6 Changed 2 years ago by anonymous
- Status changed from pending to new
This was introduced in 1.4.3 when use of sourceIndex was dropped.
comment:3 Changed 2 years ago by ajpiano
- Status changed from new to closed
- Resolution set to duplicate
comment:5 Changed 2 years ago by dmethvin
For this case your "IE-only" solution works for all browsers, so just use that. Also, consider using event delegation via .delegate() rather than using .tooltip() for all 700 elements.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for submitting a ticket to the jQuery Bug Tracker. Could you kindly provide us with a reduced test that reproduces the issues you're experiencing on jsFiddle.net (as per our guidelines)?. This would assist is in further evaluating your bug.