Skip to main content

Bug Tracker

Side navigation

#10644 closed bug (worksforme)

Opened November 02, 2011 10:15PM UTC

Closed November 18, 2011 09:03PM UTC

Last modified March 10, 2012 03:16AM UTC

jQuery performce issue in support function

Reported by: Owned by: timmywil
Priority: high Milestone:
Component: support Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

We are using jQuery 1.6.4 in few project at eBay and found that following line of code in takes around 100 ms in Firefox and IE:

support.boxModel = div.offsetWidth === 2;

if ( "zoom" in ) {



Any suggestions how can this be improved or can it be fixed.

It is HTML5 page with <!DOCTYPE html>



Attachments (0)
Change History (11)

Changed November 02, 2011 10:27PM UTC by dmethvin comment:1

owner: →
status: newpending

Interesting. How are you measuring the time it takes?

Changed November 02, 2011 10:35PM UTC by Neeraj Khanna <> comment:2

We are using "dynatrace" to check the execution time for each function and this turned out to be one of the biggest issue on our page, total execution is about 280 ms and 100 ms accounts for just this one line.

Changed November 02, 2011 10:52PM UTC by anonymous comment:3

Run dyntrace against for Firefox

Changed November 02, 2011 11:02PM UTC by dmethvin comment:4

component: unfiledsupport
milestone: None1.7.1
priority: undecidedhigh
status: pendingopen

We'll look into this for 1.7.1, we were planning to do some work there anyway. Thanks!

Changed November 02, 2011 11:16PM UTC by Neeraj Khanna <> comment:5


What is timeline for 1.7? In the meanwhile can you suggest a patch to fix this?

Changed November 03, 2011 02:45PM UTC by timmywil comment:6

For now, you could change the line to:

if ( typeof !== "undefined ) {

but we'll be doing extensive performance testing of support.js in 1.7.1

Changed November 03, 2011 04:27PM UTC by timmywil comment:7

owner: nkhanna@ebay.comtimmywil
status: openassigned

Changed November 03, 2011 05:28PM UTC by Neeraj Khanna <> comment:8

I apologize if I was not clear in my ticket, problem is in this line:

support.boxModel = div.offsetWidth === 2;

not in zoom.

I found the following thread in stackoverflow discussing the same thing, but the reason mentioned doesn't apply to our case as we have doctype for HTML5 on the page.

Changed November 03, 2011 06:49PM UTC by timmywil comment:9

I'm not able to reproduce.

Changed November 14, 2011 05:14PM UTC by rwaldron comment:10


Changed November 18, 2011 09:03PM UTC by timmywil comment:11

resolution: → worksforme
status: assignedclosed

Closing until this issue can be reproduced. Support has already undergone some changes.