Prestashop: Product page loading very slow on prestashop version 1.7.5

Created on 10 Jul 2019  路  19Comments  路  Source: PrestaShop/PrestaShop

In loading single product page very slow , few days ago is was working but now there is some issue
plz reply

1.7.5.2 Bug No change required Products

All 19 comments

Hi @PankajAdhikari,

Could you please provide us with more info? We need more details to understand how we can reproduce your issue:

  • host
  • server setup and configuration
  • PrestaShop version (source)
  • debug mode report
  • PHP error logs
  • apache error log
  • javascript console log
  • screenshots

Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/

Thanks!

Maybe not related, but I noticed same behaviour on the final release of 1.7.6.0. With product comments module installed the loading time of the product page takes way too long. Without it, the page loads perfectly fast.
Clean installation, php 7.3, just the demo products, no reviews, logged as guest.

@MockoB, PrestaShop is not compatible with PHP 7.3, in fact, PrestaShop 1.7.0 to 1.7.3 is compatible with PHP 7.1 and PrestaShop 1.7.4 & 1.7.5 & PS1.7.6 are compatible with PHP 7.2.
For more details, you can follow this link: http://build.prestashop.com/news/prestashop-1-7-is-moving-to-symfony-3-4-and-php-5-6/
Next Major release PS1.7.7 will be compatible with PHP7.3.
Thanks to downgrading your version PHP, check & feedback.

Hi, @khouloudbelguith
I just downgraded and tried if there is any difference.
With php7.2 the product page is still loading slower with product comments module installed, and much faster without it.

@MockoB, I did not manage to reproduce the issue with PS1.7.6.0.
I attached a screen record
https://drive.google.com/file/d/1WwGhIDcmq6FzZ-xY27vk5_JJROKr7EQ_/view
Could you please try to enable profiling mode
In your Projetc_Folder/config/defines.inc.php, you need to replace this

if (!defined('_PS_DEBUG_PROFILING_')) {
    define('_PS_DEBUG_PROFILING_', flase);
}

by this

if (!defined('_PS_DEBUG_PROFILING_')) {
    define('_PS_DEBUG_PROFILING_', true);
}

When profiling mode is enabled, you should have information about the time needed to run queries.

Thanks!

Here are the results:

https://imgur.com/yjbcewd

https://imgur.com/MGHHW3v

Without the module installed the loading time is between 350-500ms, and with the module installed 1500-3500ms.

I just checked your video.
Maybe I got it wrong, but I am opening random product page in the front office. And you are listing products in the back office.

The issue is when browsing front office, and opening product details page.
Sorry for not explaining it clearly.

@MockoB, thanks for these clarifications.
The product comments module is installed & enabled & it is OK.
I attached a screen record
https://drive.google.com/file/d/1BHFEQqieyH9ABIKK_P0kiaap-6E5UfJt/view

Thanks!

Hi I just made a video how to reproduce the issue. As you could see in the video when reloading the product page it is loading fine, but when you try to load it from the home page it loads slower compared to the loading time without the module installed.

https://vimeo.com/user100906920/review/348646778/19765c6deb

@PankajAdhikari, thanks for your feedback.
But your screen record is not available.
In the meantime, I attached a new screen record: https://drive.google.com/file/d/1VzRouPiPg9cEdmsdTiIVrQJRYaC7qHac/view

Thanks!

@khouloudbelguith everything looks fine on your side.
Please check the following link for the video: https://drive.google.com/open?id=17kP-dlM_UlENolNHMCDmLTfE-s4VujBk

@MockoB, thanks for your feedback.
Ping @jolelievre what do you think? in the @MockoB case, after installing the product comment => the product page is slow.

PS: in my case, it is OK.

Thanks!

Hello @MockoB,
I tested the module again to check your issue, I noticed a slow delay when you install the module on the first load, I think this is due to initialization and caching of various services like Doctrine which are used in this module (because on module installation the cache is cleared)
But I only notice it on the first product page loading, the following accesses (even or other products) are ok

Hi @jolelievre,
It is may be ok on your installation, but You could see from the video I'm opening the same product page and the loading time varies and it is always loading much slower than without the module installed.
For example the third attempt, with the module installed, took about 7 seconds to load the page.
Without the module there is never a delay.
The only thing I could do, is to give you access to the server and check it by yourself, if you are interested. I'm not a developer so I can't tell you anything more than what I see in action, sorry.

Same here, on PS 1.7.6.4, php 7.2.
If product comments (v9.2.8) are enabled, pages load about 4 seconds slower. Even pages where no comments are displayed.
For example on the front page, where no comments or ratings are displayed at all, a total of 24 CommentGrade XHR-s are made. One for each product displayed, even though only 7 of those products have ratings.
They requests are all around 640 B and they take from 3.5 to 4.3 seconds to load. On every page load, not only on the first.

Any ideas?

Hi everyone and sorry for the delay.

The problem seems to be related to the productcomments module, can you confirm it?

Yes there is a big improvement to make on productcomments

At the time I didn't dare to use the PS cache system because I didn't trust it enough and didn't know how to handle it for the FO My priority was to have up to date data for comments ALL THE TIME So I used an ajax way to fetch and display the grades for products

I realize now that it's not the right approach, the grade should be displayed via smarty So they could be cached on important pages (like homepage mainly) And the cache cleaning can be done in the BO when a comment is validated

I thought the cache cleaning could be complicated to handle, especially to target the appropriate cache that updates correctly ALL the related pages, since all the pages have different cache handling it could be complicated
But actually the comment and grades data can only be updated when you validate a comment, and I don't think merchant perform this often, you probably validate them several at a time So cleaning all the cache (at least the smarty cache) at this moment would force the update on the front, but only once and then we're good

Let me know if this behaviour seems risky, but I think it would do the job, it's not too complicated to implement and it would allow to get rid of all the ajax calls from the module

Hello @jolelievre

Shall we close this issue? Cause it seems the author is beyond our reach :sweat_smile:

Thanks!

Hello @PankajAdhikari ,

Since we had no news from you for more than 20 days, I'll close this ticket to avoid cluttering up the backlog.
Please note that you can always create a new one if further information pops up.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

centoasa picture centoasa  路  3Comments

vincent-dp picture vincent-dp  路  3Comments

nrcjea001 picture nrcjea001  路  3Comments

Fabuloops picture Fabuloops  路  3Comments

khouloudbelguith picture khouloudbelguith  路  3Comments