Skip to content
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

Optimized Rendering #6

Open
zebulonj opened this issue Jul 3, 2015 · 3 comments
Open

Optimized Rendering #6

zebulonj opened this issue Jul 3, 2015 · 3 comments

Comments

@zebulonj
Copy link
Owner

zebulonj commented Jul 3, 2015

The goal of this optimization is to ensure that rendering is not triggered more often than once per animation frame, regardless of the timing of signals and action execution.

zebulonj added a commit that referenced this issue Jul 3, 2015
@zebulonj
Copy link
Owner Author

zebulonj commented Jul 3, 2015

The use of window.requestAnimationFrame (eac6306) limits usage of this library to the browser. Enhancements will need to be made to make this library universal.

@zebulonj
Copy link
Owner Author

Currently, animation frames are being injected into the signal queue as signals. Rendering to the DOM (via React or otherwise) only occurs when there has been a change of state, but the machinery that precedes that final render is being executed on every animation frame, at significant processor cost (see #13).

@zebulonj zebulonj self-assigned this Jul 28, 2015
@zebulonj
Copy link
Owner Author

Rendering should be triggered on the next animation frame, only by the following conditions:

  • the state has been changed by an action
  • one or more animations are pending

The mechanism that manages requests for animation frames will have to be accessible to both the state accessors (setter) and the animation helper(s).

@zebulonj zebulonj removed their assignment Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant