High-performance input handling on the web | Read the Tea Leaves


17 bookmarks. First posted by amason 8 days ago.


High-performance input handling on the web | Read the Tea Leaves
from twitter
6 days ago by jackysee
input event handling. in the input event handhlers, queue or stage changes to be actually done later using requestAnimationFrame(). use requestPostAnimationFrame() to obtain the state of the dom after browser render.
web  dom  html  performance  js  javascript  ui  events 
6 days ago by reedhedges
Update: a core assumption of this blog post, which is that pointermove events fire faster than requestAnimationFrame, may be incorrect or just a browser bug. I'll update this blog post once I've tested more browsers and have more data. There is a class of UI performance problems that arise from the following situation: An input…
performance  javascript  weekly.rc  raf 
7 days ago by studiomohawk
"I hope this blog post was helpful for anyone handling scroll, touchmove, pointermove, or similar input events. Thinking in terms of how I’d like to align my work with the browser’s event loop (using requestAnimationFrame and requestPostAnimationFrame) was useful for me."

"fastdom was written in 2013 and yet it's lessons still apply today"

Note his follow-up post(https://nolanlawson.com/2019/08/14/browsers-input-events-and-frame-throttling/ ): he analyzes current browsers, but concludes that his manual rAF throttling approach is still the best
javascript  optimization  webdev  ui 
7 days ago by mechazoidal
There is a class of UI performance problems that arise from the following situation: An input event is firing faster than the browser can paint frames. Intuitively, it makes sense why this would happen.
Archive 
8 days ago by pesche
So throttle/debounce/requestAnimationFrame is not the best way to go.
javascript  performance  events 
8 days ago by thany
High-performance input handling on the web

> There is a class of UI performance problems t…
from twitter_favs
8 days ago by furtive
High-performance input handling on the web

> There is a class of UI performance problems t…
from twitter_favs
8 days ago by davidhund
RT : High-performance input handling on the web

> There is a class of UI performance problems t…
from twitter_favs
8 days ago by schraeds