Jump to content

Javascript not loading sometimes (1.6.1.17)


A  Bit of Home

Recommended Posts

We have constantly struggled with our PS 1.6 performance since we launch our site about 18 months ago. One minute response is good and the next the store response time is absolutely terrible. We started with 1&1 Hosting but moved to a VPS hosting package from  A2 Hosting about  a year ago. A2 has been very responsive in trying to get the performance issues resolved  but fixes seem to only work for a few days and then the slow responses come back. 

Before we throw in the towel on Prestashop completely we thought we would reach out to the community to see if anyone else has had similar issues.

We are currently running Prestashop 1.6.1.17. We are using the IQIT Warehouse Theme with Mega Menu. We have other 3rd party modules to handle  payment and shipping.

Problem: Javascript not always loading

If we have the performance option "Move Javascript to the end" enabled, the front end pages to do not work properly.... sometimes. The menu will not work and neither will the product carousels. Refresh the page and it usually works fine. Turn off this performance option and the pages display fine but the page takes longer to appear since the Javascript has to load.

We have a page cache module from JPresta and it recommends moving JS to the end but then we have the load issue.

Has anyone come across something similar to what we are experiencing?

Thanks for any and all feedback.

Henry

Link to comment
Share on other sites

It is a familiar problem that moving JS to the end sometimes gives trouble.  However, I don't see performance problems.

Some questions:

 - how many products and categories do you have? Do you have many combinations? Any other things that might be burdening?

 - how big (in nr of files and kilobytes) is you homepage

 - when you talk about performance issues what are we talking about? Some people find two seconds slow. Others one minute.

Link to comment
Share on other sites

6 hours ago, musicmaster said:

It is a familiar problem that moving JS to the end sometimes gives trouble.  However, I don't see performance problems.

Some questions:

 - how many products and categories do you have? Do you have many combinations? Any other things that might be burdening?

 - how big (in nr of files and kilobytes) is you homepage

 - when you talk about performance issues what are we talking about? Some people find two seconds slow. Others one minute.

We have about 50 categories and around 2,000 products. About 50 have combinations, the rest do not.

The response time is the crazy thing. Sometimes a page will load in 2 seconds, sometimes it can take 20 or more. It is very inconsistent. I think that is why it has been difficult to find what is going wrong.

I don't know if it is a clue but searching for a product by reference from the front end can take anywhere from 2 seconds to over 30. Doing the same search from the admin side is always fast. I can search for a product on the front end and while I am waiting, I can switch over to the admin and do the same search. The product appears almost right away on the admin but the front end is still waiting.

Very puzzling.

Henry.

Link to comment
Share on other sites

On 2/8/2018 at 3:15 AM, musicmaster said:

I am not sure whether it will help but you can at least try profiling. 

In config/defines.inc.php you set: define('_PS_DEBUG_PROFILING_', true);

After you do that you will below each page that you load an overview of the sql queries and how long they took.

Thank you for the tip! It tried the setting and I see a massive amount of information. I will have to study this because I am not to sure what I am looking for. To answer your earlier question about our homepage, I am including a snip of part of the debug info from our home page.

thanks,

Henry

abitofhome debug capture.PNG

Link to comment
Share on other sites

On 09/02/2018 at 10:37 AM, fedesib said:

Hi there,

I also suggest to get rid of the Merchant Expertise module in the beckend which sometimes slows things down, because it tries to connect to an external Prestashop server (sometimes very very slow).

My 2 cents,
Federica

Thank you for your suggestion Frederica. We uninstalled the Expertise module a long time ago.

regards,

Henry

Link to comment
Share on other sites

  • 2 weeks later...

Seems you are using PHP 5.6, however PS v1.6.1.17 supports PHP 7.0, which will really help with performance.

As for page caching modules, I tend not to trust or use them.  If they are not designed properly, then the wrong information gets cached and leads to bigger issues.  I would uninstall it after switching to PHP 7.0

As for the random slowness, your profile screen shot shows that 1.5 seconds were spent querying the database.  That is a very long time to wait, and suggests that either your server or mysql server is not performing well.  Could be something to explore with your hosting provider.

Link to comment
Share on other sites

5 hours ago, bellini13 said:

Seems you are using PHP 5.6, however PS v1.6.1.17 supports PHP 7.0, which will really help with performance.

As for page caching modules, I tend not to trust or use them.  If they are not designed properly, then the wrong information gets cached and leads to bigger issues.  I would uninstall it after switching to PHP 7.0

As for the random slowness, your profile screen shot shows that 1.5 seconds were spent querying the database.  That is a very long time to wait, and suggests that either your server or mysql server is not performing well.  Could be something to explore with your hosting provider.

Thank you for the advice. I will approach the technical support at A2 Hosting to see if they can test the PHP 7 configuration and look into what could be happening with the database. 

Link to comment
Share on other sites

On 21/02/2018 at 1:33 PM, A Bit of Home said:

Thank you for the advice. I will approach the technical support at A2 Hosting to see if they can test the PHP 7 configuration and look into what could be happening with the database. 

Hi,

Just wanted to update you on our progress. We had A2 set us up on PHP 7 and it does seem to help with the performance. We are having them look into the database issues. I think that is where the real problem is but we can't put our finger on what. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...