3 ms·
Not a UI / frontend developer. Doesn’t denouncing user input increase the latency before changes are rendered onto the screen? I would expect the changes to be
by stingraycharles 4y ago
Not a UI / frontend developer. Doesn’t denouncing user input increase the latency before changes are rendered onto the screen?
I would expect the changes to be visible ideally in the next frame, but I guess that’s not really an option?
- wtallis 4y agoDebouncing only has to carry a latency penalty for certain kinds of responses. A good UI should be able to start processing an action as soon as the button goes down, and add/amend the actions later once it's clear whether it was a press and hold, press and release, or double-click. If the appropriate responses to those three options are mutually exclusive to the point that the UI can't respond at all until the user input is fully disambiguated, then the keybindings are probably ill-considered and those unrelated or conflicting functions should not be sharing a button.
- ComputerGuru 4y agoIn the strictest sense, yes. But here clearly rendering is taking longer than 1/60s so it wouldn’t matter. The compromise would be to always start rendering immediately rather than wait x ms, but if you detect that the previous rendering hasn’t completed when the next input has arrived then you can start debouncing before rendering until you catch up.