Picture of Optimising page loading speed when using multiple pricing scripts

Optimising page loading speed when using multiple pricing scripts

1. Overview

This article explains how to optimize pricing script performance for products displayed on homepage, category, and search result pages in your Infigo storefront. If your storefront is experiencing slow load times due to pricing calculations, this guide will help you implement a caching mechanism to improve performance.

For additional information and detailed tutorials, the Infigo Academy offers extensive resources on a wide variety of topics. Visit the Infigo Academy to search and browse our content.


2. Contents

  1. Overview
  2. Contents
  3. Key Points and Takeaways
  4. Key Settings
  5. Scenario-Based Guide
    • Scenario 1: Addressing Slow Page Load Times Due to Pricing Scripts
  6. FAQs
  7. Alternate Search Terms

3. Key Points and Takeaways

  • Introducing a caching mechanism improves load times by storing default product prices in the database.
  • A new catalogue setting, "Use precalculated price on Product Teaser," controls the caching functionality.
  • Cached prices are automatically updated when product-related data (e.g., pricing scripts, product groups) change.
  • When caching is disabled, prices revert to on-the-fly calculations, ensuring real-time accuracy.

4. Key Settings

Setting Name: Use precalculated price on Product Teaser

  • Path: Admin > Configuration > Settings > Catalogue Settings > Use Precalculated Price on Product Teaser
  • Explanation: Enables caching of product prices for teaser views on the homepage, category, and search result pages to improve performance.

5. Scenario-Based Guide

Scenario 1: Addressing Slow Page Load Times Due to Pricing Scripts

Problem:
Your storefront homepage takes 10-20 seconds to load due to pricing scripts executing repeatedly for products.

Solution:

  1. Navigate to the Catalogue Settings page in the admin panel.
  2. Enable the setting "Use precalculated price on Product Teaser."
  3. Monitor the load times after enabling the setting. Cached prices will now be used for product teasers, reducing script execution overhead.

6. FAQs

Q: What happens if I disable the "Use precalculated price on Product Teaser" setting?
A: Cached prices are reset to null, and prices are calculated on the fly in real-time.

Q: Will enabling cached pricing affect real-time updates?
A: No, background jobs automatically update cached prices when product-related data changes.


For additional information and detailed tutorials, the Infigo Academy offers extensive resources on a wide variety of topics. Visit the Infigo Academy to search and browse our content.

Incomplete
Alternate Search Terms

Individual Search Words

performance, optimization, caching, precalculation, pricing, script, execution, catalog, product, teaser

Alternate Search Phrases

improve script performance, optimize pricing scripts, cache default prices, product price optimization, catalog page speed, homepage pricing updates, background price task, cached product pricing, precalculated prices feature, price calculation performance