Very interesting patch - sorry I apparently missed it/forgot about it before. I'm loving the speed improvements (loaded up IE7 and I'm seeing 2x+ improvements across the board - along with Firefox, etc.)
There are a bunch of points though that we'll need to take into consideration: 1) This isn't actually a patch right now - it's more of a plugin (a patch would modify the existing codebase and provide a diff of the changes that need to be made). 2) The code, as it stands, doesn't match any of the existing coding style of jQuery (braces not matching, $ used instead of jQuery, code on the same line as an if, not enough spaces around statements). 3) Why does $.size exist? Why not just have the functionality be in .height()/.width() - or in .curCSS(). I don't see a need for a new function here. 4) Does it still pass the test suite? Any progress on this would definitely help to get this patch landed. I can take a look at reorganizing all of it eventually - but it might just get delayed - you help will make it go faster. Thanks! --John On Fri, Feb 13, 2009 at 4:00 PM, mike.helgeson <[email protected]> wrote: > > 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. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
