salesforcedx-vscode
salesforcedx-vscode copied to clipboard
❓ Ask: Help us gather Deploy/Retrieve perf data - "Deploy Source to org is too slow"
As for me, it is issue either at SF side or CLI. But I hope you'll dedicate all resources to resolve this issue. It is blocker for a lot of people and I don't think that fancy new features are needed when core functionality is not working properly :)
Thank you for your hard work.
Originally posted by @dima007arenko in https://github.com/forcedotcom/salesforcedx-vscode/issues/4865#issuecomment-1930553339
I am asking for your help in providing some additional information that will hopefully give me a good pointer to where the bottleneck(s) might be. I want to collect debug logs from slow deploys so I might be able to isolate the issues. The steps below will guide you through the process. Once completed I would as that you post the relevant logs, the org Id that was the target of the deploy and you machine configuration.
The log file to return is located in home directory, under folder .sf
. The log files are date stamped with current date, i.e. sf-2024-03-11.log.
I would like affected customers to do the following.
In vscode v60.2.3 or greater
- Shutdown vscode
- Remove the
sf
log file, if present. This is to minimize the amount of logging info collected during the deploy. - Start vscode
- Open workspace settings
- Search for SF_LOG_LEVEL
- Change the setting to debug
- Restart the workspace
- Run the slow deploy to completion
- Shutdown vscode
- Return requested data as a post to this issue Thanks in advance
This issue is grinding work to a halt. It takes 5+ minutes for each deploy via CLI.
@johnhutchins are you in a position to follow the above steps and with the data you provide I will try to determine what might be happening on your deploy?
I would also ask for the org id of the org you are currently using.
I am asking for your help in providing some additional information that will hopefully give me a good pointer to where the bottleneck(s) might be. I want to collect debug logs from slow deploys so I might be able to isolate the issues. The steps below will guide you through the process. Once completed I would as that you post the relevant logs, the org Id that was the target of the deploy and you machine configuration.
The log file to return is located in home directory, under folder
.sf
. The log files are date stamped with current date, i.e. sf-2024-03-11.log.I would like affected customers to do the following.
In vscode v60.2.3 or greater
- Shutdown vscode
- Remove the
sf
log file, if present. This is to minimize the amount of logging info collected during the deploy.- Start vscode
- Open workspace settings
- Search for SF_LOG_LEVEL
- Change the setting to debug
- Restart the workspace
- Run the slow deploy to completion
- Shutdown vscode
- Return requested data as a post to this issue Thanks in advance
I would like to share data for this issue but I have a question. Where would I find the sf log file if, present? Would it be directly in my project folder or is it under another folder down the tree?
@EsauSanchez thanks for volunteering.
The .sf
folder is in your home directory. There is one on the project folder too, but that is for project level storage.
In case this will help anyone else I would like to share our experience. We use vscode and the deploy source to org function as a regular step in our development process. Starting some time in late 2023 / early 2024 we started to notice that deploy source operations that we were accustomed to taking a few seconds (eg. 1 - 3 seconds) started taking longer... sometimes much much longer, like over a minute. Early on is seemed intermittent, but it got progressively worse, to the point that developer productivity was badly impacted. We were waiting 2 to 3 minutes to deploy a line of code and run a test that would have in the past taken less than 30 seconds for the whole deploy and test operation. We suspect that the problem started when our org was migrated to the new salesforce cloud environment. We read this post and many others and tried the recommended mitigations to no avail.
WE FINALLY FOUND A SOLUTION!
In our sandbox environment we went to Settings -> Apex Settings and unchecked the "Perform Synchronous Compile on Deploy" checkbox. Since we made this change, our deploy source to org operations are back to taking a couple of seconds. It has been life changing. Hope this helps someone else.
this worked thank you :) @onelittleant
In case this will help anyone else I would like to share our experience. We use vscode and the deploy source to org function as a regular step in our development process. Starting some time in late 2023 / early 2024 we started to notice that deploy source operations that we were accustomed to taking a few seconds (eg. 1 - 3 seconds) started taking longer... sometimes much much longer, like over a minute. Early on is seemed intermittent, but it got progressively worse, to the point that developer productivity was badly impacted. We were waiting 2 to 3 minutes to deploy a line of code and run a test that would have in the past taken less than 30 seconds for the whole deploy and test operation. We suspect that the problem started when our org was migrated to the new salesforce cloud environment. We read this post and many others and tried the recommended mitigations to no avail.
WE FINALLY FOUND A SOLUTION!
In our sandbox environment we went to Settings -> Apex Settings and unchecked the "Perform Synchronous Compile on Deploy" checkbox. Since we made this change, our deploy source to org operations are back to taking a couple of seconds. It has been life changing. Hope this helps someone else.