Description
I work on chromium and was investigating scroll performance on time.com and that led me to the tether.js code that adds a touchmove
listener. touchmove
(and wheel
) listeners can have a substantial impact on scroll performance. I'd like to understand the use cases here so we can help improve the web platform to avoid the performance implications.
Can you help me understand what tether.js's touchmove
listener is doing? To me it appears to (along with the scroll
and resize
listeners) cause the positions of elements to be updated. But shouldn't scroll
and resize
be enough on their own? I certainly can't think of any scenario where you'd get a touchmove
that moves things around without also a scroll
(except maybe during pinch-zoom)?
We hope to be adding tooling to Chrome devtools to better help site owners blame specific scripts for scroll performance issues. If, as I suspect, the touchmove
listener in tether.js isn't providing any real value, then hopefully you can just remove it. But if it is, then I'd like to better understand the scenario so we can help address it (maybe with passive event listeners?)