Jump to content

Improve performance (with layered navigation module)


homefoodfinder

Recommended Posts

Hello, 

 

I did a fresh install of prestashop 1.6 on my test site with the default bootstrap theme. After all the customization, the load time was 3 seconds for the product listing page. But after I installed the layered navigation module, the load time is 35 seconds for the product listing page. This is very frustrating especially since my page speed score is 88% and Yslow is 86%. Not sure what to do. 

 

Need someone to figure out the issue and improve the performance of my site to 3 seconds. On completion of the same, I would also like help on moving the entire site and DB to my live domain. 

 

Let me know if you are interested and the quote for the same. My test site URL is www.homefood-finder.com

  • Like 1
Link to comment
Share on other sites

HI,

 

based on some website speed tests, it seems like the mistake might be not in Prestashop or your module, but maybe DNS servers.

http://www.webpagetest.org/result/140616_1P_988/1/details/

 

Most of the time (40+ seconds) it takes the website to call the URL of your site. Then roughly 3-4 seconds is about loading of the content. Try contacting your hosting provider.

Link to comment
Share on other sites

Do you have caching turned on? Prestashop should cache that module. You also might check to see if the cache directory is writable and is being written to. Time the preformance with caching turned off and then it turned on and see if there is a difference. All the time from my best guess is spent querying the database. 

Link to comment
Share on other sites

So finally figured out that the issue was a conflict between the layered navigation module and the agile multi-sellar module which I had installed. If I uninstall either of the modules (keeping only my site and block layered OR keeping only my site and multi-sellar module), the load time reduces to 4 seconds. 

 

I reached out to the creator of agile multi-sellar module and he gave me an add-on block layered module. So now with both the multi-sellar functionality and block layered functionality, the load time is 11 seconds. This is much better than the 35 seconds I had but hoping to reduce it further. 

 

DH41 - I have the smarty cache turned on and the permission for the smarty cache and compile folder is 755 (all folders within cache/compile have permission as 771). Hence cache is turned on and am assuming it is written to. There was no difference in time between cached turned on vs turned off. 

Link to comment
Share on other sites

Ok, so am still having the issue and very frustrated with the same. 

 

My product categories take 11 seconds to load for repeat view (with cache) and takes 26 seconds to load the first time (after I clear smarty cache and my browser cache). The time to first byte is 8-9 seconds for repeat view and 15 seconds for first time view. 

 

If I uninstall the agile block layered module, then the load time reduces to 4 seconds.

 

I originally had a conflict between prestashop block layered module and agile multi-sellar module as both were using product-list override. Hence the agile module creator asked me to use the agile block layered module instead of prestashop block layered module. This reduced the load time on repeat view from 35 seconds to 11 seconds. But this is still very slow. 

 

Can someone please review the module for me? If not, my only option is to disable all agile modules though I purchased it in the first place because I need the functionality.  

 

Have given below my performance settings. Have asked my host to enable APC cache even though this is not going to help with the time to load first byte. 

 

If somebody can look review my site fully and reduce the total time to less than 3 seconds, that would be awesome. 

 

Performance settings:

Template compilation: If files have been updated

Cache: Yes

Smart cache for CSS: Yes

Smart cache for JS: Yes

Minify JS: Yes

Minify HTML: Yes

Apache optimization: yes

Use cahce: (currently no. but planning to try APC)

Link to comment
Share on other sites

You might check out this caching module, I have had great results with it. https://www.xtendify.com/en/product/111-express-cache-speed-up-your-prestashop-module

One of the limitations they have mentioned is that the cache does not work when the user is logged in. Given that users are automatically logged in when they visit the site, isn't this a significant limitation?

Link to comment
Share on other sites

For shops with same situation, like +- optimized frontend (2.5 second on page load/rendering it's not so good, but not so bad too), but slow backend (with troubles in time to first byte e.g. much load on DB like in your case), imho, simplest solution - migrate to VPS, now good VPS starts from $20-30/month + you can optimize server software as you wish, 

example  not fully optimized, but and VPS cost $5/ month :)

Link to comment
Share on other sites

For shops with same situation, like +- optimized frontend (2.5 second on page load/rendering it's not so good, but not so bad too), but slow backend (with troubles in time to first byte e.g. much load on DB like in your case), imho, simplest solution - migrate to VPS, now good VPS starts from $20-30/month + you can optimize server software as you wish, 

example  not fully optimized, but and VPS cost $5/ month :)

Hello Sergey, 

 

Actually I am already on a VPS. Moved to a VPS 1 month back thinking it will improve things. It did because my site was much slower. Moving to VPS and upgrading to prestashop 1.6 helped to an extent but I guess there is a lot of room for improvement. 

 

Regards

Prashanthinie

Link to comment
Share on other sites

I would instal PECL and give APC a go, it usually does a great job at helping the execution times or PHP. 

Thanks DH42. would try it and let you know. 

 

BTW, in addition to my time to first byte, I am seeing that my fonts.googleapis.com takes 2.5 seconds to load. Getting this in my GT Metrix test:

 

The following external stylesheets were included inhttp://homefoodfinder.com/themes/default-bootstrap/cache/v_97_5d2df352485d82eac825a801a771ce94_all.cssusing @import.

Is there any way to improve the above?

Link to comment
Share on other sites

you still do not understand

http://www.webpagetest.org/result/140621_8J_GJJ/1/details/

 

google fonts loaded on frontend, not backend, and take 100-200 ms. But as you see you have first looong green line - this time while server get request from browser, ask php + db, and give you html in answer,

for all other requests - images. css, jss this "green line"= time to first byte for each request, it is small, so, all ok with getting this resources from server side, but for "get html" request it's  long (bad)

 

So most important question - what happened on server side? in your case I would check:

- db indexes (created/enabled in all needed tables?), slow queries log, DB settings

- update php version to 5.5 (much better)

- trying to change webserver on Nginx and exclude Apache, or use Nginx for static content delivery

 

just 10-18 sec for category page.. on VPS... it's not normal

Link to comment
Share on other sites

you still do not understand

http://www.webpagetest.org/result/140621_8J_GJJ/1/details/

 

google fonts loaded on frontend, not backend, and take 100-200 ms. But as you see you have first looong green line - this time while server get request from browser, ask php + db, and give you html in answer,

for all other requests - images. css, jss this "green line"= time to first byte for each request, it is small, so, all ok with getting this resources from server side, but for "get html" request it's  long (bad)

 

So most important question - what happened on server side? in your case I would check:

- db indexes (created/enabled in all needed tables?), slow queries log, DB settings

- update php version to 5.5 (much better)

- trying to change webserver on Nginx and exclude Apache, or use Nginx for static content delivery

 

just 10-18 sec for category page.. on VPS... it's not normal

 

Thanks Sergey. would discuss this with my current hosting company. BTW, I am also planning to move to inmotion VPS hosting next week (so that I can have the server in the same country as my users and hopefully the support provided is better)

 

Just curious: If it is something to do with the server, then how does the time to first byte go down to 3.5 seconds when I uninstall the agile multi-sellar module or the block layered module?

Edited by homefoodfinder (see edit history)
Link to comment
Share on other sites

The issue is the module is not caching database calls properly. If you turn debug profiling on I would be willing to be that the loading time is all from database queries having to do with the layer navigation. 

Link to comment
Share on other sites

The issue is the module is not caching database calls properly. If you turn debug profiling on I would be willing to be that the loading time is all from database queries having to do with the layer navigation. 

Thanks a lot DH42. 

 

I have turned on the error reporting and debug profiling on my live site (www.homefoodfinder.com). You can try the category "South Indian". 

 

Let me know if you want me to clear smarty cache. 

Link to comment
Share on other sites

I mean to be honest the queries cannot be optimized or reduced, they need to be executed to load the page. I would look into the cache module that I mentioned earlier. It will keep the database calls to a minimum.

Link to comment
Share on other sites

Thanks Sergey. would discuss this with my current hosting company. BTW, I am also planning to move to inmotion VPS hosting next week (so that I can have the server in the same country as my users and hopefully the support provided is better)

 

if you mean this inmotionhosting . com - I do not recommend, have client with server on this hosting - expensive servers, but awful performance, just imho VPS for $600/mo should "fly" with any DB/ data, but it is not 

Link to comment
Share on other sites

if you mean this inmotionhosting . com - I do not recommend, have client with server on this hosting - expensive servers, but awful performance, just imho VPS for $600/mo should "fly" with any DB/ data, but it is not 

oh wow. The other options I have for India are bluehost and hostgator. Any recommendations?

Link to comment
Share on other sites

@homefoodfinder

I did few times of investigation at your testing site (you gave me before). Most time it is working as normal between 2-4 seconds. I also saw one time when I fist visit your store, the first page loading takes a little bit longer as 8-10 seconds. Except that, I did not see large delays.

 

For first visit of 10 seconds, I am not sure if this is the case - 

When no none access the store for a while (depends server settings), the server may remove the application (process) from server memory to save resources. After that when you (or someone) first time access the store, the server will start the application and re-allocate memory and resources, this initialization also takes some time. But this happens at any page you first visit, not just the category page.

 
You can try other service providers (usually they have 3 days money back period) to see if it changes. I know this may take some of your time. I am not sure if this related to server configuration, but you can have a try the cache module suggested by DH42, wish that will help.
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...