12

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?

1 Answer 1

5

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.

9
  • 1
    Thanks. How would I enable second generation packaging in a Sandbox environment?
    – Robs
    Commented Sep 13, 2018 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
    Commented Sep 13, 2018 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). Commented Oct 15, 2018 at 12:36
  • 2
    @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. Commented Mar 2, 2019 at 20:29
  • 2
    @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 Commented Mar 27, 2019 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .