Skip to content

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

Open
@MichaelSuen-thePointer

Description

@MichaelSuen-thePointer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-PerformancePerformance-related issueArea-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-BugIt either shouldn't be doing this or needs an investigation.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions