From 259fe51cb7a5d1bf4eae1320d9ab56de54a0ead3 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 5 Dec 2026 04:56:00 +0100 Subject: [PATCH] perf: typing lags while many folder chat tabs are open (#35689) Typing in a folder chat gets sluggish once a dozen chats are open as tabs. Every key press searched the whole page for an open dialog before checking whether the key was a tab shortcut at all, and that search gets slower with every open tab. Now only the tab shortcut keys trigger the search, so normal typing skips it and the shortcuts behave as before. The table shows typing 40 characters with 12 folder chat tabs open, as the median of 8 interleaved runs per side (Chromium with 6x CPU slowdown, WebKit unthrottled).
| action | browser | before | after |
|---|---|---|---|
| time the page is blocked while typing | Chromium | 1012 ms | 79 ms |
| time the page is blocked while typing | WebKit | 2870 ms | 864 ms |
| delay from key press to screen update | Chromium | 58 ms | 43 ms |
| delay from key press to screen update | WebKit | 63 ms | 35 ms |