perf: fix UI degradation with large SSH config files. Issue #11078#11094
Open
hsdelirium wants to merge 5 commits intoEugeny:masterfrom
Open
perf: fix UI degradation with large SSH config files. Issue #11078#11094hsdelirium wants to merge 5 commits intoEugeny:masterfrom
hsdelirium wants to merge 5 commits intoEugeny:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add mtime-based cache with Promise deduplication to OpenSSHImporter to avoid re-parsing ~/.ssh/config on every change detection cycle.
To test, create ~1k fake hosts in ~/.ssh/config and measure the loading time of the profile list.
upd:
Performance: avoid redundant DOM updates — HTML binding directive now skips re-rendering when the value hasn't changed, reducing unnecessary DOM manipulation during change detection cycles.
Performance: profile descriptions computed once per refresh — profile descriptions are now cached after each profile list refresh instead of being recomputed on every render, which is significant when the list is large or descriptions are expensive to resolve.
Performance: profile list loaded once per refresh — the profiles settings page now fetches the full profile list once instead of twice when refreshing.
Performance: faster PowerShell detection on Windows — well-known installation paths are checked first before falling back to a full PATH scan, reducing startup latency on Windows.
Performance: SSH config parsing cached to disk — parsed SSH profiles are persisted to a local JSON cache keyed by the config file's modification time. On subsequent loads, if the file hasn't changed, the cache is used instead of re-parsing, speeding up startup when the SSH config is large.
Correctness: profile selector includes all profile fields — when building selector options from a profile, all profile fields are now forwarded instead of a manually maintained subset, preventing fields from being silently dropped as the profile schema evolves.
Correctness: added missing default field for terminal color scheme — the profile defaults object now explicitly includes terminalColorScheme, ensuring it is always present when profiles are merged.