Yabber Posted Tuesday at 05:56 AM Posted Tuesday at 05:56 AM Thirtybees inherited a completely useless attribute combination feature from PrestaShop 1.6, which generates a huge number of SQL queries on the product page. After running tests with a profiler, it’s clear that this serious bug in the store engine’s architecture has been fixed in the latest versions of PrestaShop. I believe that fixing this bug should be a priority in Thirtybees, because in its current form, this feature is completely useless, except perhaps for a few or a dozen attribute combinations. The screenshots show profiler data for a product with a thousand attribute combinations.
the.rampage.rado Posted Tuesday at 09:44 AM Posted Tuesday at 09:44 AM Do you have proposal how to fix this 'bug'? I believe it's architecture change that breaks compatibility with many things.
wakabayashi Posted Tuesday at 01:32 PM Posted Tuesday at 01:32 PM 7 hours ago, Yabber said: The screenshots show profiler data for a product with a thousand attribute combinations. Well, is it then even a bug? It would also be interesting to see, which queries are loaded that often. I personally tend to avoid attributes.
Yabber Posted yesterday at 07:01 AM Author Posted yesterday at 07:01 AM 17 hours ago, wakabayashi said: Well, is it then even a bug? Such a huge number of SQL queries is definitely a serious bug in the design of this feature. It results in very long loading times for product pages. That’s why, in PrestaShop 1.6, no one used this feature, and everyone was forced to purchase “Attribute Wizard Pro” module.
wakabayashi Posted yesterday at 12:28 PM Posted yesterday at 12:28 PM Ah yeah I agree. It's a bad design. But likely not a classical bug, where you just can fix a few lines. But as I said, it would be interesting to see, which queries/functions are called that often.
Yabber Posted yesterday at 01:30 PM Author Posted yesterday at 01:30 PM 58 minutes ago, wakabayashi said: But as I said, it would be interesting to see, which queries/functions are called that often. A painstaking analysis, examining 20 thousand SQL queries 🙂 For comparison, a Prestashop 1.6 fork called PhenixSuite. For a thousand attribute combinations, “only” 8 thousand SQL queries. So, to some extent, optimizing this functionality is possible.
wakabayashi Posted yesterday at 07:32 PM Posted yesterday at 07:32 PM You can scroll down and there should be something like "doubles". I guess this section could be helpful.
Yabber Posted 17 hours ago Author Posted 17 hours ago 10 hours ago, wakabayashi said: You can scroll down and there should be something like "doubles". I guess this section could be helpful. After analyzing the profiler logs, I realized that the “blocklayered” module was generating such a huge number of SQL queries. After disabling the module, the number of SQL queries dropped from 21 thousands to 3 thousands. It is puzzling that this occurs on the product page, where no navigation filters are supported. We need to take a closer look at the structure of this “blocklayered” module.
wakabayashi Posted 14 hours ago Posted 14 hours ago I don't use this module. So I can't much for it. But filter modules are often the crucial point for speed. If it occurs on product pages, that is very dubious. What does blocklayerd make on a product page?
Yabber Posted 12 hours ago Author Posted 12 hours ago 1 hour ago, wakabayashi said: If it occurs on product pages, that is very dubious. What does blocklayerd make on a product page? I found the cause of the product page crashing when there are a large number of attribute combinations and the “blocklayered” module is installed. In the Product class, within the two methods getAttributesInformationsByProduct() and getAttributesParams(), SQL queries have been added with the following condition: if (Module::isInstalled(‘blocklayered’) && Module::isEnabled(‘blocklayered’)) { And these are the ones generating such a huge number of SQL queries on the product page. Interestingly, after removing these SQL queries from the Product class, the navigation filter block on category pages works correctly 🙂 I would report this on GitHub, but there’s no point, because no one has been handling these issues for almost a year now. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now