New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #7974: Keep animations synchronized and cleanup effects.js #177
Conversation
- get rid of jQuery.each iterating over style properties to reduce function calls - cache jQuery[...] variables (e.g. jQuery.style, jQuery.extend) to minimize out-of-scope lookups and to reduce filesize - use a single var - cache elem.style and prop[p] to reduce filesize
remove useless r variable
…e it to reduce filesize
also try to reduce number of var declarations
…rs.length is not cached
got any before/after benchmarks? |
…ated elements. Side effect: fixes #7917, synchronize animations FTW!
Yep, I've built a jsFiddle with my updated effects.js added on top of jquery 1.4.4 http://jsfiddle.net/louisremi/V3Xqt/5/ (remove effects.js in "manage ressources" to see the difference) Tell me what you see. |
And here is the ticket: http://bugs.jquery.com/ticket/7974 |
…ionnal parameters with 'false'
…ity' duration. fx.now would be the current time.
…uery.easing.swing existence since it's now built into jQuery
…pt.curAnim into opt.animatedProperties Cut more function calls! comment more of fn.animate code
That has been superseded by timmywil's pull. |
small changes to effect.js that:
It yields some interesting performance improvement, as demonstrated in this example: http://jsfiddle.net/V3Xqt/6/ (remove patched effects.js in "manage ressources" menu and hit 'run' again to see the difference)
/!\ example might be unrealistic /!\
As it keeps animations synchronized, it fixes http://bugs.jquery.com/7917 and addresses a similar problem to http://bugs.jquery.com/6281