forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
954 stars 406 forks source link

Very slow sfdx retrieve #5360

Closed matt495 closed 8 months ago

matt495 commented 8 months ago

Hello,

When I want to retreive Source apex class from Org, it take almost 1 hour to execute operation

11:58:02.873 Starting SFDX: Retrieve Source from Org

=== Retrieved Source FULL NAME TYPE PROJECT PATH
──────────────── ───────── ──────────────────────────────────────────────────────────── XXX ApexClass force-app\main\default\classes\XXX.cls
XXX ApexClass force-app\main\default\classes\XXX.cls-meta.xml

12:46:36.660 ended SFDX: Retrieve Source from Org

Do you have a process to correct this situation ?

Salesforce Extension Version in VS Code: v59.13.0

SFDX CLI Version: @salesforce/cli/2.10.2 win32-x64 node-v18.18.0

OS and version: Windows 10 Professionnel

VS Code version: version 1.85.2

daphne-sfdc commented 8 months ago

Hi @matt495, Sorry to hear you are facing this issue. It's a long-running issue, and our team has been keeping track of it at #4865. We are planning to investigate this issue further and try to tackle it in this iteration.

In the meantime, we got a workaround to downgrade to 58.14.1 of the extensions and upgrade to 2.22.2 of the CLI, which was a combination that worked for another user. Can you try this combination and see if it improves your retrieve times?

mrinalsharma736 commented 8 months ago

@daphne-sfdc Hi, We are also facing the same issue since last week. We are using Mac OS. is there any workaround you have for mac users?

Extension 58.14.1 and CLI 2.22.2 doesn't work for us.

daphne-sfdc commented 8 months ago

Hi @mrinalsharma736, Got it. Since downgrading was not a usable workaround, please upgrade your extensions and CLI back to the latest version.

I see you have already found #4865, our long-running thread on this slow deployment/retrieval issue. I'm going to assume you are continuing this thread because you have already tried all the OS-agnostic workarounds that our team proposed in that thread and none of them worked for you. (If that is not the case, please go through that thread and try all the workarounds.)

At this point, I'm going to collect some info to help my team diagnose the issue. My first question: What happens if you run your retrieve using the CLI in the Terminal instead of using the VSCode command? Do you also see this slow retrieval time using the CLI? (The CLI command is sf project retrieve start --source-dir=<path to your file> --target-org=<your org username or alias>) I'm asking because the VSCode extensions and the CLI use a set of shared libraries for deploy/retrieve, and I'd like to know if the issue is in the extensions or the shared libraries.

matt495 commented 8 months ago

@daphne-sfdc Hi, We are also facing the same issue since last week. We are using Mac OS. is there any workaround you have for mac users?

Extension 58.14.1 and CLI 2.22.2 doesn't work for us.

Hello, I'm resolved issue now. I updated my environment with these versions :

I don't know about mac environment but I don't think this is related to mac. I heard that the gearset tool was also impacted Good luck

daphne-sfdc commented 8 months ago

Thanks @matt495 for your confirmation, and I'm very happy to hear that the you're able to stay on the latest version of both the CLI and the VSCode Extensions.

@mrinalsharma736 I see you have already created a separate issue for this - let's continue diagnosing there.