G
G
Glory2021-06-11 21:59:56
PHP
Glory, 2021-06-11 21:59:56

How to speed up the loading of a page with a product filter?

The site is made on php + Nuxt (vue.js ), that is, SSR is used.
The situation is this - pages with a product filter take a long time to load.
The fact is that to load it, you need to perform several queries to the database, some of which are complex ones:

Getting a list of products with the necessary selection and sorting is the simplest.

In addition, you will have to:
- get min and max prices
- get a list of product brands
- get a list of product sellers
- get a list of product categories indicating the quantities of goods in each of them

And so on the additional characteristics of the goods. After all, the point is that when you select some parameter in the filter, other lists with values ​​​​for selection should also change. How can all this be accelerated?

That is, the meaning of the question is to find out how to make sure that the goods are loaded first, and the lists for filters are filled in later.

At the same time, the site is made on php + Nuxt (vue.js )

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2021-06-11
@New_Horizons

Count filters by cron and cache.
Another interesting thing: https://habr.com/ru/post/261137/

O
Oleg Kirillov, 2021-07-06
@exmach

Requests are made through Promise.all ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question