D
D
Dmitry Krupin2020-07-28 02:09:02
Server optimization
Dmitry Krupin, 2020-07-28 02:09:02

How can woocomerce be optimized?

When you open a category in the site directory, there are very long downloads, half a minute and a minute. The server was set up as best they could, and all sorts of caching, everything is ok with this. I suspect that some kind of request is written clumsily and when opening a category with 1000 positions, information is requested not for 50 products at a time (pagination is configured this way), but for the entire 1000, and given that they are variable and there are delays.

Maybe someone has examples of when that can optimize / fix it, well, or tell me why it can be so, maybe someone has an example of a normal query to display large categories?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg, 2020-07-28
@politon

Forgive me moderators...
5f1f6ee359c1f368690330.jpeg

when opening a category with 1000 positions, information is requested not for 50 products at a time (pagination is configured this way), but for the entire 1000

1000 products Carl... in one request... The pagination is so set up... It's cruel...

S
Stas Khitrich, 2020-07-28
@Snova_s_vami

It is better to make a request (even 50 each) and load an additional amount with Ajax when scrolling or clicking on a button, you better not optimize. There is infa on the Internet on this topic ...
PS: I'm also scared to imagine what kind of animal it is)

P
Pychev Anatoly, 2020-07-28
@pton

Woocommerce makes normal queries out of the box, given pagination. Why did you have to twist his brain.
But if you still want such requests, then you need to cache the result of the request in the object cache. In addition, for the object cache to work adequately, in your case, you need Redis. It will allow you to store intermediate results of db requests between http requests. Then only the first access to the page will last for a long time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question