jquery-archive / PEP

Pointer Events Polyfill: a unified event system for the web platform
https://www.w3.org/TR/pointerevents/
Other
1.67k stars 160 forks source link

Performance pointer events vs touch events #397

Closed Mapiac closed 3 years ago

Mapiac commented 4 years ago

This is from 2016 Chrome Docs but I wonder if the performance gains on a complex application using touch events handlers (for drag and drops, lot's of other listeners, touchMove with preventDefaults, debouncing, etc) is as reduced by using preventDefault or passiveEventListeners as is implied here? Would it be more performant using pointer-events and touch-action none all over the place as much as we do preventDefault?

If this was the case why is anyone using touchEvents anymore like interact.js, zingTouch or hammer.js? We looked at two other options here to improve performance (we use FastDOM library with debouncing) but they don't offer enough granular control of touchMove (like angles etc). The last idea was a library like Torbin to have 1 command control center to observe all DOM events but there is a worry that will lock us in. What are very complex touch event apps where performance is critical using these days? Thanks!

https://github.com/robb0wen/tornis

https://gist.github.com/SleepWalker/da5636b1abcbaff48c4d?fbclid=IwAR1ulYasBGJo2gdTC2b2pTh84IdObk6JdHstykl1DuKYPfk2o4S2GA-n-T4

image

patrickhlauke commented 3 years ago

PEP has now entered emeritus status at the OpenJS Foundation. This repository is now archived.