Answer the question
In order to leave comments, you need to log in
Why does ajax search slow down?
Hi everybody.
In general, I write SPA, and in my stack I use:
Laravel, Vue, ElasticSearch. The whole project is raised on docker.
In general, the task is this:
There is a search string. The user enters something there, the request is sent to the Laravel server,
Laravel asks Elastic to find the info on the entered string, Laravel sends the found info to Vue.
So everything is OK, everything is displayed, but at some point the search string slows down, that is, I stupidly cannot enter anything there. This deceleration time is approximately 1s. And who knows what causes this inhibition.
At first I thought elastic, but infa first came out, and then this braking occurs.
The server is not contacted with every click. There is a delay of 600 ms.
debounce: _.debounce((cb) => {
cb()
}, 600),
Answer the question
In order to leave comments, you need to log in
What do you get and how? If you get json with nested json, then it should be so.
It turns out after an api request or whatever you have there, the controller has one json, puts it in another, third, fifth, tenth, then sends it back to the client.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question