jiku / again-src

A music presentation and delivery system
http://github.com/jiku/again
2 stars 0 forks source link

Improve scroll performance #78

Open jiku opened 8 years ago

jiku commented 8 years ago

'Chrome Dev Tools' > 'Rendering' > 'Show scrolling perf' seemingly identifies whole viewport as having a mousewheel listener. (Update: ScrollMagic on Window. Also note all the listeners on scroll...)

screen shot 2015-10-27 at 17 30 51

From [docs](https://developer.chrome.com/devtools/docs/rendering-settings#show-potential scroll bottlenecks)

Show potential scroll bottlenecks shows areas of the page that slow down scrolling. Touch and mousewheel event listeners can delay scrolling. Some areas need to repaint their content when scrolled. >Additional details on causes in this ticket and more explanation is in this Github issue thread

TESTS

Use
Chrome Desktop

Can't see much performance boost by disabling pane and particles.

Chrome dev tools.
jsperf.com

Solutions

asm.js, LLJS, emscripten, etc.

https://www.youtube.com/watch?v=F6Zn8Q0nuEE https://www.youtube.com/watch?v=HL3upR6g1yg int64, int32, SIMD, (pthreads)... Not sure...

emscripten

https://www.youtube.com/watch?v=JhMlWj4tCDo

LLJS
DEMOS

https://youtu.be/HL3upR6g1yg?t=1676

Libraries

ScrollMagic (current)

Is big at ~245 KB.

Ideal

https://github.com/mkautzmann/scroll-proxy https://github.com/ProperJS/ScrollController https://github.com/BaptisteBriel/smooth-scrolling https://github.com/ayamflow/raf-scroll https://github.com/GianlucaGuarini/parallax

Find more with https://npmsearch.com/?q=scroll%20position%20ios

jiku commented 8 years ago

Abstract ScrolMagic use (modularize), so it can be replaced when moving to React (or whatever)?

Maybe related to (improvable with) #54.