Best Practices When Working with Snapshot Differences

Updated 4 months ago by Copado Solutions

When working with snapshot differences, you may sometimes notice that the calculation takes a bit too long. Here are some tips that will help you reduce calculation time:

  • Differences can be displayed in different formats: JSON, XML or YAML. Using JSON or YAML reduces the calculation time by about 50% and the attachment file size in comparison to the standard XML comparison option.
  • If the comparison takes too long because you have a lot of metadata, you can take the following actions using the Partial Selection option:
    • Strategy 1:
      • In the partial selection table, deselect metadata types that you don’t need to compare, for example:
        • Documents are usually created directly in production and are not deployed between sandboxes. Additionally, documents are very large in size, thus increasing the calculation time significantly given the download waiting time in the Copado backend.
        • Reports and dashboards are usually created directly in production and are not deployed between sandboxes. If this is your case, there is no need to include them in the calculation.
        • Then click on Select All, to select all other metadata components.
        • Click on Calculate Differences.
    • Strategy 2:
      • Split the snapshot difference calculation into different batches using the Partial Selection option. Running them individually means they run in parallel, thus reducing the comparison execution time:
        • Compare record A:
          • Contains data model:
            • CustomObject
            • Layout
        • Compare record B:
          • Contains logic and visibility metadata:
            • Apex
            • Lightning/Aura Components
            • WorkflowRules
            • Flows
            • Application
            • Tab
            • CustomPermission
            • NamedCredential
        • Compare record C:
          • Contains permission group metadata:
            • Profiles
            • PermissionSets
            • PermissionSetGroup
        • Compare record D:
          • Contains all other metadata types.


How did we do?