microsoft / microsoft/terminal

Peformance Issue: Too many ssh profiles makes the settings panel laggy.

Open
#15,024 1 comment 0 reactions 0 assignees View on GitHub
Area-Performance Area-UserInterface Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.16.10261.0

### Windows build number

10.0.19042.1110

### Other Software

_No response_

### Steps to reproduce

I have to manage a server cluster with about 5900 machines. I script-generated `settings.json` with all this 5900 ssh profiles for every machine. And group them by using "actions">"commands" in `settings.json`
Which causes the 'V' button response laggy and settings panel unable to open (whole program hangs).

Its not a rare use case I think. Hope you can optimize this senario.

Sample `settings.json`, to reproduce this issue, you need manually generate `settings.json` with that many profiles, below is the sample.

```json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{92a35041-2568-427d-8e9d-c0fffbe6d951}",
"copyOnSelect": true,
"multiLinePasteWarning": false,
"copyFormatting": false,
"profiles": {
"defaults": {
// Put settings here that you want to apply to all profiles.
"suppressApplicationTitle": true
},
"list": [
{
"commandline": "ssh user@group1-host1",
"guid": "{b8b31d11-bddb-4495-9dc0-aea26abd0a82}",
"name": "group1-host1-user"
},
{
"commandline": "ssh user@group1-host2",
"guid": "{b8b31d11-bddb-4495-9dc0-aea26abd0a83}",
"name": "group1-host2-user"
},
{
"commandline": "ssh user@group1-host3",
"guid": "{b8b31d11-bddb-4495-9dc0-aea26abd0a84}",
"name": "group1-host3-user"
}
//omit the rest 5897 profiles
]
},
"actions": [
{
"commands": [
{
"command": {
"action": "newTab",
"profile": "{b8b31d11-bddb-4495-9dc0-aea26abd0a82}"
},
"name": "host1-user"
},
{
"command": {
"action": "newTab",
"profile": "{b8b31d11-bddb-4495-9dc0-aea26abd0a83}"
},
"name": "host2-user"
},
{
"command": {
"action": "newTab",
"profile": "{b8b31d11-bddb-4495-9dc0-aea26abd0a84}"
},
"name": "host3-user"
}
],
"name": "group1"
}
//omit the rest groups
]
}
```

### Expected Behavior

Not laggy, 5900 is not a huge number to be honest.

### Actual Behavior

Laggy V button, settings UI unable to open.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a generated settings.json containing about 5900 SSH profiles and actions, then profile the settings panel and the 'V' button path. Done means the panel opens and the button remains responsive with this configuration instead of hanging or becoming laggy.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.