Dimensions Speed Improvement

Dimensions Speed Improvement


I provided a patch about 8 months ago to improve the performance of
the core height and width and dimensions inner/outer[height/width]
methods.
http://groups.google.com/group/jquery-dev/browse_thread/thread/a4becc9a5cc34fea/
I put together a test page to help make my point...
http://dev.helgeson.info/dimension/
I average the following results using FF3/XP...
(percentages of the unpatched method time)
height & width ~ 73%
innerHeight & innerWidth ~ 44%
outerHeight & outerWidth ~ 19%
outerHeight( true ) & outerWidth( true ) ~ 32%
I updated the patch to be compatable with 1.3.x
http://dev.jquery.com/ticket/3082
In addition to being more efficient, the methods also simplify the API
by overloading the height/width methods. By passing in a string
("padding" or "border" or "margin") you get in return, the dimension
through that property.