🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
Integrations / Salesforce Commerce Cloud B2C

Performance considerations

The v2 indexing jobs (available from cartridge version 23.5.0) bring many performance improvements compared to the v1 jobs.

This guide provides additional tips to help you further improve your indexing performance.

Only export the attributes which are necessary for your business

Retrieving attributes from the database and exporting them is expensive. Every millisecond counts when the number of products is high.

Limit the number of attributes you’re exporting to the ones you’re using on your frontend. Removing unused, forgotten, and stale attributes improves job run times.

Pay attention to both complex and simple attributes

Your products have:

  • Simple (static) attributes that can be retrieved by a simple “getter” method
  • Complex (dynamic) attributes which must be calculated at the time of the query, for each product, for each locale.

When considering which attributes to remove from the list of exported attributes, start by eliminating the complex ones first.

Number of currencies and locales affects run time

If your site recently changed and you have unused currencies or locales configured, consider removing them in Business Manager as products will be exported using these locales and currencies as well.

Chunk size

The default chunk size for the new jobs is 500, while the maximum is 1,000.

The products to be exported are broken down into chunks of this size, with multiple chunks executing in parallel. To achieve the best performance, you should set this value higher if you have a large catalog with many products. If you have a small catalog or your products change infrequently, set this value lower.

Environment

Jobs run significantly faster on Production instances than they do on sandboxes due to having more resources assigned to them.

On-demand sandboxes can be configured with three tiers of allocated resources.

Job scheduling

Schedule jobs in a staggered manner. Don’t run jobs at the same time even if they access different resources or business object types.

Try to run high-volume jobs, such as full catalog exports, during low-traffic hours, like nighttime.

Don’t schedule jobs to start at the top of the hour, instead schedule them to start at random minutes of the hour (for example 2:17 or 6:39). This is due to your B2C instances running on multi-tenant servers. If every tenant configures their job to start at the top of the same hour, that means slower access for everyone.

Use each job for its intended purpose

Partial update jobs, such as AlgoliaProductInventoryExport_v2 and AlgoliaProductPriceExport_v2, finish quickly compared to a full catalog export job, since they only export one relatively easily calculable attribute. The list of attributes for partial update jobs can be extended, but this will increase job run times.

Did you find this page helpful?