This project is archived and is in readonly mode.

#552 ✓invalid
Michal

Suggestion: global timer for transitions

Reported by Michal | January 13th, 2009 @ 05:46 PM | in 2.0 (closed)

I've noticed that if there are many tween/morph instances transitioning at the same time, the transitions can get quite jerky. I guess this is because each instance sets up it's own periodical function, and each time it is called the browser has to re-render (maybe some of) the page.

This can be solved with a single Fx.Elements instance, but sometimes it is required that the elements appear to transition independently.

What about this: having essentially a "global" periodical function that is used for all Fx instances. Every time an Fx instance starts off a transition, all it does is add a function to a list. This function would set the style(s) of the element(s) it wants to transition. The 'global' periodical function then calls each function from this list in turn. At the end of the Fx instance's transition, the function is removed from the list.

This would mean that each the browser would not want to re-render elements more than some given fps times per second, no matter how many tween/morph instances are running.

I think also there would have to be one global periodical function per fps: but I imagine most people stick with the default.

(I wasn't sure whether to put this here or the forum, but I thought here as it is a suggestion for the core.)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages