NEW226954
Only processes single key event per frame
https://bugs.webkit.org/show_bug.cgi?id=226954
Summary Only processes single key event per frame
Michael Feldstein
Reported 2021-06-12 08:52:33 PDT
Created attachment 431260 [details] Example Video It appears WebKit only handles one input event, for example keypress, per animation frame. This is ok if your app is super fast, or if you type slower than the fps, but if there's any performance issues it quickly causes multiple frame slowdowns. Here is an example repro. It has a long-running animation frame to slow the fps down a bit. https://codepen.io/jlfwong/pen/GRWXzBM If you type very quickly (just bash keys) in chrome it keeps up with your typing but if you do it in WebKit/Safari you'll quickly see the keys come in one at a time over many many frames. This happens on Mac and iOS
Attachments
Example Video (262.35 KB, video/mp4)
2021-06-12 08:52 PDT, Michael Feldstein
no flags
Alexey Proskuryakov
Comment 1 2021-06-12 14:56:54 PDT
I verified that Chrome processes keypresses quickly even when there is an even handler attached, so it's not just a shortcut code path for a case when there isn't one.
Michael Feldstein
Comment 2 2021-06-14 08:04:30 PDT
Yes it happens with or without handlers attached, and i also confirmed Firefox does the fast multi-event handling behavior as well.
Radar WebKit Bug Importer
Comment 3 2021-06-19 08:53:16 PDT
Alexey Proskuryakov
Comment 4 2022-02-10 10:27:30 PST
*** Bug 236393 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.