3 ms·
Improving Responsiveness in Text Inputs
- montroser 5y agoThe requestIdleCallback approach can be a nice alternative to requestAnimationFrame or debouncing. But note that requestIdleCallback is not supported in Safari, so you have to shim it there. The spec is a good read: https://w3c.github.io/requestidlecallback/ https://w3c.github.io/requestidlecallback/
- tintt 5y agoI wish industry encouraged engineers more to pay attention to this kind of things, rather than to flashy bells and whistles. 30-50ms may seem insignificant, but has a huge impact on the overall experience.
- corbins 5y ago1ms is significant if you're a heavy user: https://www.youtube.com/watch?v=vOvQCPLkPt4 https://www.youtube.com/watch?v=vOvQCPLkPt4.
- amelius 5y agoThat would require a real-time OS, I suppose.
- jimktrains2 5y agoYou only need a real-time os if you're guaranteeing maximum latency.
- amelius 5y agoWhich is exactly what was asked for.
- gumby 5y ago“Realtime” doesn’t imply faster. In fact often the opposite. It just means certain timing constraints will be satisfied, often making explicit what the costs (tradeoffs) are.
- amelius 5y agoYes, the constraint here is 1ms.
- perlancar3 5y agoFrom the video, 1ms feels real time, but with 5ms you can still notice the lag. So wouldn't it be more appropriate to say "4ms is significant"?
- mewpmewp2 5y agoI think one of the issues here is how to do it with something like React without it being hacky. If you are working with React for instance, updating the DOM manually may seem very bad, so you must take care how to approach this without doing unnecessary calculations and re-renders.
- enzv 5y agoHave a look at https://www.solidjs.com/ https://www.solidjs.com/ I looks very promising. Taking the best parts of React's API, but avoiding the performance bottleneck of a VDOM.
- fsflover 5y agoI can't believe this is 2021 and we have seriously such a title.