Replies: 18 comments 11 replies
-
PS: Disabling the features from Advanced -> Performance settings, makes the product load in less than 7 seconds. |
Beta Was this translation helpful? Give feedback.
-
Please also pay special notice to this query taking 2.38s with 60 calls select * from ps_feature_value v left join ps_feature_value_lang vl on (v.id_feature_value = vl.id_feature_value and vl.id_lang = ?) where v.id_feature = ? and (v.custom is null or v.custom = ?) order by vl.value asc It appears to me as the order by clause is actually slowing down the query execution. e.g. select * from ps_feature_value v left join ps_feature_value_lang vl on (v.id_feature_value = vl.id_feature_value and vl.id_lang = 2) where (v.custom is null or v.custom = 0) order by vl.value asc limit 1,500; takes 1.2sec to execute but
takes 70ms
This query seems to come from function \FeatureValueCore::getFeatureValuesWithLang |
Beta Was this translation helpful? Give feedback.
-
Hi @ioweb-gr, the product page has been completely remade for Prestashop v8.1, specifically the combination management is now lightning fast. My suggestion - do you think you could make a copy of your shop's data, try it with 8.1 beta and tell us the results of your tests? https://github.com/PrestaShop/PrestaShop/releases/tag/8.1.0-beta.1 If there are still some bottlenecks, we could try to find a way to optimize it. I think there is nothing that the maintainer team can do with a performance on such old version now, sorry. 👍 |
Beta Was this translation helpful? Give feedback.
-
Well the thing is that we bump into other errors when trying to upgrade the website even to 1.7.8 versions as there's no proper upgrade script that can manage the database upgrade. In that respect Presta reminds me of Joomla updates, where everything broke once you upgraded. Nonetheless I would like to give it a try provided there is an upgrade script for 8.1.0 to try it on a staging env. Is there a clear documentation on how to move from 1.7 to 8? |
Beta Was this translation helpful? Give feedback.
-
@ioweb-gr Upgrade using the autoupgrade module should work fine, it will handle everything. Yes, it can break things that are not compatible, but if you upgrade all your modules before the upgrade, it should be a smooth sail. Then maybe some theme tweaks and fixes and you should be golden. |
Beta Was this translation helpful? Give feedback.
-
Can I skip the backup process of the module? |
Beta Was this translation helpful? Give feedback.
-
So I would love to upgrade it so that I can test the backend at least but it seems I get this error
|
Beta Was this translation helpful? Give feedback.
-
After modifying the interface and class to accept null as parameter the site opened but I can not log in to the backend to test. It doesn't throw any error in php error logs, symfony logs, or the backend page, it just refreshes to a log in prompt. It seems it can't upgrade the database correctly
And a silent error on the login screen again |
Beta Was this translation helpful? Give feedback.
-
@kpodemski could you please test this? Thanks :) |
Beta Was this translation helpful? Give feedback.
-
Hi @ioweb-gr First of all, thanks for reporting this. Regarding autoupgrade: it's quite a complicated subject. There's clearly a problem with your database structure because this query from 1.7.8.0.sql, didn't work:
Anyway, I think you reported something that could be improved, whether it's a new product page or some other places using features coming from this method. We discuss improvements using "Github Discussions", so I'm transferring this conversation there. For the time being, I suggest you remove |
Beta Was this translation helpful? Give feedback.
-
@kpodemski The query itself worked fine when executed by itself, so the reason why it failed is unknown. Is it possible this specific upgrade script was never executed due to a bug in any case? After adding the column I still experience the same login issue. The problem is there is no error logged whatsoever, just a dead page as shown in the image. Any assistance is appreciated to get to the bottom of this issue as it's a critical performance issue. Blackfire reports indicate very poor performance. |
Beta Was this translation helpful? Give feedback.
-
Any ideas why I get this error during log in? I'm trying to upgrade so that I can test the performance on the upgraded database (backend only) and I get so many db errors. Autoupgrade doesn't really work properly
The error's stack trace points to core functions only
|
Beta Was this translation helpful? Give feedback.
-
OK I've managed to open the admin page by fixing the query above and now I have access to the catalog page on the backend. There is no difference whatsoever with Prestashop 8.0.1 and with hundreds of combinations and images on a product it won't open unless we reach a minute or so. I'll see if I can upgrade further |
Beta Was this translation helpful? Give feedback.
-
And I'm getting error INFO - === Step upgradeDb |
Beta Was this translation helpful? Give feedback.
-
Latest version 8.0.2 and the issue persists. Products with lots of features are very slow to openin the backend. |
Beta Was this translation helpful? Give feedback.
-
indexing the tables containing id_feature, custom, id_feature_value, and id_lang will likely result in improved performance. I won't be able to verify this with hundreds of product features anyway. |
Beta Was this translation helpful? Give feedback.
-
I could request permission to share the tables containing products / product features if needed but it can only be shared via a secure channel with prestashop |
Beta Was this translation helpful? Give feedback.
-
So here's the timeline of how long it takes to load the page... 51 seconds on 8.0.2 which is pretty much slower than 1.7.5.2 so not only did it not improve, it's actually worse. |
Beta Was this translation helpful? Give feedback.
-
Prerequisites
Describe the bug and add attachments
We have a website with fairly large products with combinations packed with features. Most of our products have over 60 features active (with more than 20 possible values per feature) and some have combinations of over 40 colors and 10 sizes and there are more than 40 images as well per product.
When trying to edit the product in the backend we face extreme slowdown and browser freezing.
It can take more than 5 minutes to give control to the user, until the interface becomes responsive and fully loaded.
Microsoft edge profiler, reports loops of rendering layout which takes more than 2-3 seconds I'm assuming for each new feature it causes layout shift and re-render.
Moreover, we profiled prestashop and noticed there are fairly large execution times just to load the form, apart from rendering it in the browser.
e.g. a request like this
is repeated 3 times with total execution of over 10 seconds to fetch the combinations with the timeline like this
Also the actual request to fetch the product in admin is taking more than 34 seconds
With the timeline showing some very specific delays in evaluating twig templates for display
The server is a 12core dedicated server with 64G RAM and Nvme disk and the load is very low so we can exclude server performance
![image](https://user-images.githubusercontent.com/20220341/224469364-8a8a7243-e24c-4d0c-83fe-5d4b81a0340c.png)
Expected behavior
Product is open to edit in 5-15 seconds
Steps to reproduce
PrestaShop version(s) where the bug happened
1.7.5.2
PHP version(s) where the bug happened
7.2/7.3
If your bug is related to a module, specify its name and its version
Prestashop Features
Beta Was this translation helpful? Give feedback.
All reactions