Side navigation
#12513 closed bug (duplicate)
Opened September 11, 2012 03:27PM UTC
Closed September 11, 2012 03:29PM UTC
jQuery 1.8.1 slow click function response time
Reported by: | dominik@bulaj.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi!
After upgrading from jQuery 1.8.0 to 1.8.1 simple $("a:first").click(); (or any other ID element or class based selector) takes ~400ms (measured in Chrome and Firefox using console.time() and console.timeEnd()).
I figured out it's related to binding two live events in our application:
$('[data-dialog=message][data-recipient!=""]').live('click', function(e) {/*body - doesn't affect response time*/});
and
$('[class~="layer"][data-dialog!=""]').live('click', function(e){/*body*/});
When I remove those two pieces of code above
$("a:first").click();takes only 20ms (it's quite big website - 45kB of body document).
When I downgrade to 1.8.0 above code works nice and responds in less than 40ms. 400ms is too much for UX (everything looks slow).
Attachments (0)
Change History (1)
Changed September 11, 2012 03:29PM UTC by comment:1
resolution: | → duplicate |
---|---|
status: | new → closed |
Duplicate of #12436.