Few tips how to speed up saving product in magento

Few tips how to speed up saving product in magento

October 3, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Few tips how to speed up saving product in magento

Optimizing Product Saving Performance in Magento

In Magento, saving products can indeed be a time-consuming process due to the extensive use of observers and events. If you’re facing performance issues during product updates via the API, here are some practical tips to help speed up the process.

Identifying Non-Essential Observers

Magento comes with many predefined observers that hook into the catalog_product_save_* events. Some of these observers handle critical functionality like inventory management and search reindexing, while others provide additional features or integrations.

To identify non-essential observers:

  1. Open your Magento installation directory.
  2. Navigate to app/code/vendor/magento/module-catalog/etc/events.xml.
  3. Look for observer configurations under the <observers> node.

For example:

<observers>
    <catalog_product_prepare_save>
        <item name="save_inventory_data" instance="Magento\InventorySalesAdminUi\Model\SaveInventoryLevelData">
            <sort_order>1</sort_order>
        </item>
        <item name="update_search_index_status" instance="Magento\Elasticsearch\Model\Indexer\Product\Action\UpdateSearchIndexStatus"/>
    </catalog_product_prepare_save>
</observers>

The save_inventory_data observer handles inventory level updates, which is a critical function. On the other hand, some observers like those for third-party extensions or custom features might not be necessary.

Disabling Unnecessary Observers

To disable an observer:

  1. Locate the module’s etc/events.xml file (e.g., for the catalog module: /app/code/vendor/magento/module-catalog/etc/events.xml)
  2. Comment out or remove the non-essential observers from the <observers> section.

Before:

<observers>
    <catalog_product_prepare_save_before>
        <item name="custom_extension_observer" instance="Vendor\Extension\Model\Observer"/>
    </catalog_product_prepare_save_before>
</observers>

After:

<observers>
    <!-- <catalog_product_prepare_save_before>
        <item name="custom_extension_observer" instance="Vendor\Extension\Model\Observer"/>
    </catalog_product_prepare_save_before> -->
</observers>

Optimizing Indexing and Reindexing

Indexing and reindexing are major contributors to saving performance issues. Magento uses indexes for search functionality, catalog data caching, and product visibility.

  1. Disable unnecessary indexes: Open app/code/vendor/magento/module-indexer/etc/config.xml and comment out or remove indexes that aren’t required for your specific store configuration.

  2. Schedule reindexing: Instead of reindexing immediately after each product save, you can schedule it to run during off-peak hours using the Magento cron job. This reduces the immediate impact on performance.

Enabling Indexer Status Update

By default, Magento updates index status when a product is saved. If your store doesn’t rely heavily on search functionality or real-time catalog visibility, you can disable this update:

  1. Open app/code/vendor/magento/module-indexer/etc/events.xml.
  2. Comment out the update_index_status observer under the appropriate event (e.g., catalog_product_save_after).

Performance Profiling and Tuning

To gain deeper insights into your performance bottlenecks, consider using Magento’s built-in profiling tools or external tools like Xdebug for PHP profiling.

  1. Enable Magento’s built-in profiler: Add <profiler active="true"/> to app/etc/env.php under the MAGE_PROFILER array.
  2. Examine the generated profile reports in var/profiler/.

Conclusion

Optimizing product saving performance requires a strategic approach that balances functionality with efficiency. By disabling non-essential observers, optimizing indexing, and leveraging profiling tools, you can significantly improve your Magento store’s performance during product updates.

Remember to thoroughly test any optimizations in a staging environment before applying them to your production site. The key is to identify the optimal balance between speed and feature richness for your specific business requirements.

For more advanced performance tuning techniques, I recommend exploring our comprehensive guide on Magento Performance Optimization at Laravel Company’s Blog.

Catalog Indexing Performance API

Our network