• Resolved tonysilvatsd16

    (@tonysilvatsd16)


    Hello,

    On a store with +800 attribute stock rules, with two items in the cart, there is about 300 queries that is slowing the website down.

    In the function match_product_stock in the Matches class, we are looping through all matches including matches with empty filters in it, returning a huge amount of rows

    But in our case, all attribute stock rules have at least one product in it, so we only want to loop through the rules that match that product with their corresponding attributes, i tested adding a function that ignores attribute stock rules that have empty filters (products) and it reduces the amount of queries, improving the loading speed in about 1s

    Current implementation:

    https://pastebin.com/bM0sStMh

    The variable $ignore_empty_filters could be like a global setting. What are your thoughts / problems with this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Attribute stock +800 through performance’ is closed to new replies.