-
Notifications
You must be signed in to change notification settings - Fork 780
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
Should we care about requestAnimationFrame? #90
Comments
I think it's a good idea. Depending on the effects used the state might be updated more than 60 times per second, which would probably lead to high CPU usage, etc. E.g. I planned to use hyperapp when re-writing @smartflat. It'd easily be possible to get more than 60 sensor updates per second in that particular project. |
Always nice with performance optimisations and I think no matter what we should provide examples on how to do this in the documentation. Personally I'd prefer not to have it included, because I often work on projects that involve a lot of canvas, WebGL, tweening etc. and to avoid multiple That being said, I guess it's in most peoples interest to have stuff like this included out of the box and it's what most virtual dom implementations do. It could be fun to do some performance testing, and see how much it actually does for the performance. @dodekeract @smartflat looks really interesting! Nice one. |
This. I haven't had time to work on new benchmarks since http://mathieuancelin.github.io/js-repaint-perfs/hyperapp/, but I also want to see how much it would mean for performance. |
Example: /cc @tzellman |
Close in favor of #286. |
The initial commit of hyperapp demonstrates how to use [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame to batch view renderings, largely based in Raynos/main-loop.
At the time, I was using Matt-Esch/virtual-dom, but when I moved to Snabbdom I dropped this in favor of whatever Snabbdom was doing. Now that we're using a in-house vdom algorithm, it is worth considering using requestAnimationFrame again.
Ideally this would come after #75.
The text was updated successfully, but these errors were encountered: