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

Open
opened 2026-01-31 06:47:24 +00:00 by claunia · 1 comment
Owner

Originally created by @MichaelSuen-thePointer on GitHub (Mar 21, 2023).

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.

{
	"$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.

Originally created by @MichaelSuen-thePointer on GitHub (Mar 21, 2023). ### 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.
claunia added the Issue-BugProduct-TerminalArea-UserInterfaceArea-Performance labels 2026-01-31 06:47:24 +00:00
Author
Owner

@lhecker commented on GitHub (Mar 22, 2023):

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

image

It seems like 5899 profiles is the limit then. 😄

But in all seriousness, yes, I agree, it should be performant. There's no reason why it should be worse than O(n) and n=5900 for anything is not that much. 🙂

@lhecker commented on GitHub (Mar 22, 2023): > Not laggy, 5900 is not a huge number to be honest. ![image](https://user-images.githubusercontent.com/2256941/226981791-2f0fc7ae-7a59-4313-98c2-fd195949a048.png) It seems like 5899 profiles is the limit then. 😄 But in all seriousness, yes, I agree, it should be performant. There's no reason why it should be worse than O(n) and n=5900 for anything is not _that_ much. 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19564