7

I am using command:

SFDX: Deploy Source to Org

To deploy Apex code to a sandbox environment.

But often it is taking a very long time (multiple minutes) to respond/complete.

QUESTION

How can I get quicker feedback/response from Salesforce?

4

How can I get quicker feedback/response from Salesforce?

You can't; it takes as long as it takes. The force:source:deploy command can't determine a minimal deployment package to generate, so it deploys everything. Making smaller packages and/or using 2GP (second generation packaging) would greatly improve performance.

| improve this answer | |
  • 1
    Thanks. How would I enable second generation packaging in a Sandbox environment? – Robs Sep 13 '18 at 12:56
  • @Robs 2GP is enabled in your dev hub org. The packages would be installed to your sandbox for testing. Remember, DX is a source-driven tool, not an org-driven tool. It's a different way of doing development. You'd be developing in a scratch org as opposed to a sandbox. Sandboxes would be given more of a QA/UAT role than development in that scenario. – sfdcfox Sep 13 '18 at 15:28
  • 1
    I've noticed that using Org-based development model (now available for SFDX) deploying a single class takes much more (>30s) in comparison to working with tools like MavenMate (<10s). – jonathanwiesel Oct 15 '18 at 12:36
  • 1
    @sfdcfox, I think what Jonathan is referring to retrieving/deploying single file vs package.xml. I as seeing upwards of 40-50 seconds to push any changes. And about a minute to open default org. – Mitesh Sura Mar 2 '19 at 20:29
  • 1
    @sfdcfox you may want to update this answer. You can definitely deploy individual files to sandboxes with force:source:deploy, at least as of v45.0. I'm also frustrated by this, and I see that the actual deployment/load of the metadata is only taking 10-20 seconds, but that the deployment job/request can be stuck in PENDING status for SEVERAL minutes. I hope SFDX starts offering the option to use the Tooling API rather than MD API for performance – Bow-chicawow-ers Mar 27 '19 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.