Skip to main content

Bug Tracker

Side navigation

#12689 closed bug (wontfix)

Opened October 09, 2012 10:30PM UTC

Closed October 14, 2012 10:09PM UTC

Last modified November 15, 2013 07:00AM UTC

outerWidth and outerHeight performance degraded in jQuery 1.8

Reported by: Owned by:
Priority: low Milestone: None
Component: dimensions Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Beginning with jQuery 1.8, the performance of outerWidth and outerHeight has been seriously degraded. In the latest versions of Chrome and Firefox, the methods are 70-80% slower.

A performance test comparing jQuery 1.7 and 1.8 can be found at

I have an application that frequently has to calculate DOM element height and widths and the application has begun to severely lag since upgrading to jQuery 1.8

Attachments (0)
Change History (6)

Changed October 09, 2012 10:37PM UTC by dmethvin comment:1

owner: →
status: newpending

Can you tell us a bit more about the situation? Even at the "slow" 22k/sec number it seems unlikely an app could be bottlenecked on this.

Changed October 09, 2012 11:07PM UTC by comment:2

status: pendingnew

The app has a list of DOM elements and as the mouse moves, it checks if the current mouse position intersections any of the DOM elements. If the mouse intersections one of the DOM elements (which could be anywhere in the DOM hierarchy and is why mouseenter/mouseleave events can't be used), an effect is applied to the DOM element that intersects. In jQuery 1.7, the effect was seamlessly added and removed as the mouse moves. In jQuery 1.8, there is a delay in the effect being applied.

This may be a combination of both the decreased performance in outerWidth/outerHeight and offset. Also, the visual delay appears to be limited to Firefox (15 & 16).

I'll try to make a jsFiddle to reproduce this and post it soon.

Changed October 14, 2012 10:09PM UTC by mikesherov comment:3

component: unfileddimensions
priority: undecidedlow
resolution: → wontfix
status: newclosed

We know why this is happening, it's related to the accuracy improvements we landed for 1.8. We're not going to revert here, and the only way we can improve the performance here is by implementing #11938 which is a candidate for 1.9.

For this reason, I'm going to close this bug as wontfix. Please follow #11938 if you're interested in seeing this fixed.

Changed September 02, 2013 05:14PM UTC by comment:4

It´s even more slow at 1.9 and 1.10

Changed November 14, 2013 10:49AM UTC by anonymous comment:5

I found this bug through source file with two hours debugging and reading source.

Changed November 15, 2013 07:00AM UTC by anonymous comment:6

I write function using computedStyle to get the width and heigth, this fast the function.

the function need to be the method of jQuery.fn,so you can use it like use other function with jQuery.