forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
494 stars 78 forks source link

SFDX commands takes very long time to execute #3124

Open stanislaw-zan-aviva opened 1 week ago

stanislaw-zan-aviva commented 1 week ago

Summary

SF CLI commands takes very long time to execute. How can I diagnose what is going on? I suspect it may be due to my corporate laptop network settings - how can I debug it to get what calls are executed within CLI, so I can give a list of them to my IT department?

Steps To Reproduce

Run sf org list command or sf org display

Expected result

They should run faster, comfortable under 10 seconds

Actual result

They are running very slow, in range 60-300 seconds

Additional information

%{ "{0:o}: {1}" -f (Get-Date), $_ } is used to get timestamps.

sf org list command:

2024-11-21T11:17:37.1836533+01:00:
PS C:\Users\a218256> sf org list | %{ "{0:o}: {1}" -f (Get-Date), $_ }
2024-11-21T11:21:38.3670099+01:00: 

it took 241 seconds

sf org display command:

2024-11-21T11:25:40.5823423+01:00:
PS C:\Users\a218256>   sf org display -o orgName | %{ "{0:o}: {1}" -f (Get-Date), $_ }
2024-11-21T11:26:46.4239902+01:00: === Org Description

it took 66 seconds

System Information

Powershell in Windows 10, both in powershell window and in IntelliJ terminal sf version --verbose --json

{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.67.7",
"nodeVersion": "node-v22.11.0",
"osVersion": "Windows_NT 10.0.19045",
"rootPath": "C:\\Users\\a218256\\AppData\\Local\\sf\\client\\2.67.7-3acb081",
"shell": "powershell",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.8 (core)",
"@oclif/plugin-commands 4.1.8 (core)",
"@oclif/plugin-help 6.2.16 (core)",
"@oclif/plugin-not-found 3.2.25 (core)",
"@oclif/plugin-plugins 5.4.15 (core)",
"@oclif/plugin-search 1.2.14 (core)",
"@oclif/plugin-update 4.6.10 (core)",
"@oclif/plugin-version 2.2.15 (core)",
"@oclif/plugin-warn-if-update-available 3.1.21 (core)",
"@oclif/plugin-which 3.2.17 (core)",
"@salesforce/cli 2.67.7 (core)",
"apex 3.6.2 (core)",
"api 1.3.2 (core)",
"auth 3.6.73 (core)",
"data 3.11.3 (core)",
"deploy-retrieve 3.15.11 (core)",
"info 3.4.18 (core)",
"limits 3.3.39 (core)",
"marketplace 1.3.4 (core)",
"org 5.1.4 (core)",
"packaging 2.9.0 (core)",
"schema 3.3.40 (core)",
"settings 2.4.4 (core)",
"sobject 1.4.45 (core)",
"telemetry 3.6.20 (core)",
"templates 56.3.29 (core)",
"trust 3.7.41 (core)",
"user 3.6.2 (core)"
]
}
github-actions[bot] commented 1 week ago

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

WillieRuemmele commented 1 week ago

you can add --dev-debug as and see the logging, and what's happening. If you have a lot of orgs in org:list, it can take a while to establish a connection with all of them. If you have a lot of expired orgs, you can run org list --clean and it will remove those too