Modify ↓
Ticket #7974 (closed enhancement: fixed)
Cleanup effects.js to improve performances and reduce filesize
| Reported by: | lrbabe | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.6 |
| Component: | effects | Version: | 1.4.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I've opened a pull request of small changes to effect.js that:
- reduce function calls, jQuery.now() calls in particular
- reduce number of out-of-scope variables lookups
- cache more variables to reduce file-size once minified
It yields some interesting performance improvement, as demonstrated in this example: http://jsfiddle.net/louisremi/V3Xqt/5/ (remove patched effects.js in "manage ressources" menu to see the difference)
- function calls: 1177 -> 1022 = 13% better
- average execution time: 26.1 -> 23.4 = 10% better
/!\ example might be unrealistic /!\
As a side effect, it keeps animations synchronized and thus fixes #7917 and addresses a similar problem to #6281
Change History
comment:1 Changed 2 years ago by jitter
- Priority changed from undecided to low
- Type changed from bug to enhancement
- Component changed from unfiled to effects
- Milestone changed from 1.next to 1.6
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
