Files
1grzyb1 a4dc442b25 VIM-4379 Do not scan all keys on every keystroke
Key.findKeyByName copies and walks every Key in the application while holding
a global lock. IdeaVim called it several times on every keystroke: from
isIdeaVimDisabledHere (commit window and Kotlin decompiled file checks) and
from the smart step into workaround in VimShortcutKeyAction. On a big project
with many keys this froze the UI. A missing key, e.g. the Kotlin one in an IDE
without Kotlin, was the worst case, because the scan always ran to the end.

NamedKey remembers the key once it is found. While the key is missing, it only
checks keys created since the previous lookup. Key indices only grow, and the
owner may create its key later, when its class is loaded, so this never misses
a new key. The key is held weakly, so it doesn't keep an unloaded plugin alive.

isAllowedFileEditor now runs the cheap and most common checks first, and
isEnabledConsole checks the option before inspecting the editor.
2026-11-17 09:09:30 +01:00
..