Jump to content

Page speed vs. Hosting- the images


razvy

Recommended Posts

Hi,

 

I have a shop with 1.6.1.1 version of Prestashop.

 

Generally, I am satisfied with the site speed, when I go to specific product page it is loading in 1-2 seconds, wich is ok.

My problem is that if I am searching a product through the search bar, it is taking a lot of time.

 

My question is: in this particular case, of product search, what is the MOST IMPORTANT thing to optimize? 

 

For example, if I search a term it is taking 20 seconds for the result page to load! Of course, I have about 25.000 products in the shop, from wich only 10.000 active at a time, so there is a lot to search in.

But my competition has the same amount of products, even more, and it only takes 2-3 seconds to search for the same term...

 

I have tried a lot of tweaks, I have optimized a lot of things, I have even tested with different types of hosting, from shared to VPS, it doesn't change significantly.

 

My feeling is that it has something to do with the way the queries are made to the database in order to extract the products that comply with the search.

 

I don't think it has anything to do with:

- the images (the waiting time is not waisted during page loading, but the browser is waiting for the server to prepare the content, mainly)

- the cache (same as above, the page has to be prepared when a term is searched for, it can not be found in the cache)

 

I think it is mainly related to the speed wich when the database is looked in.

What do you guys think?

 

 

 

Link to comment
Share on other sites

First: You really need VPS, with *at least* 2G memory, 2 CPU. No shared hosting, ever.

 

When you are going to start optimizaing MySQL you see quickly, that you need more memory.

Then you might want to start a mysql test with mysqltuner.pl.

For a manual: https://www.howtoforge.com/tuning-mysql-performance-with-mysqltuner

 

My guess is, that your InnoDB buffer is too small.

For my clients I use 512MB, which reaches it limits in due time, depending on the size of your shop.

This will be your major improvement.

Maybe you might look at an Opcode cache, but that won't have much effect on your query result speed.

 

Unfortunetaly you need root access to your server and some basic server OS knowledge,

Your hoster might help, but there is plenty to read out there.

This is a nice one: https://wiki.mikejung.biz/MySQL_Optimization

 

I am sure this helps.

 

Regards.

Link to comment
Share on other sites

Searching in the shop is just doing a lookup in the ps_search_word and ps_search_index tables. That shouldn't take that long. Maybe an index on those tables is broken?

Did you switch _PS_DEBUG_PROFILING_ in defines.inc.php on?

 

Inactive products aren't indexed so that shouldn't produce problems.

 

My guess is that it may have to do with (a lack of) caching: search queries tend to be unique so they are not cached but fresh pages.

Edited by musicmaster (see edit history)
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...