Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slowness during the display #167

Closed
curquiza opened this issue Oct 27, 2021 · 15 comments · Fixed by #458
Closed

Slowness during the display #167

curquiza opened this issue Oct 27, 2021 · 15 comments · Fixed by #458
Labels
bug Something isn't working

Comments

@curquiza
Copy link
Member

curquiza commented Oct 27, 2021

As it was reported on our Slack community, some slowness is noticeable using the mini-dashboard.

This slowness is not present when only using instant-meilisearch (the dependency used by this repo).
As you can see:

Mini-dashboard:
https://user-images.githubusercontent.com/20380692/139108096-d4e8d7fc-03f8-4157-adc6-11697c02f239.mp4

Only instant-meilisearch
https://user-images.githubusercontent.com/20380692/139108334-2cd7f9fd-a200-46a2-a618-ced5a453a086.mp4

Also here are the processing time of Instant MeiliSearch

Screenshot 2021-10-26 at 20 43 20

Can interest @bidoubiwa
Ask for @bidoubiwa for the dataset

@curquiza curquiza changed the title Slowness in during the display Slowness during the display Oct 27, 2021
@curquiza
Copy link
Member Author

curquiza commented Nov 3, 2021

Checked with @bidoubiwa, some additional information that might interest the mini-dashboard:

  • we are aware of some latencies (or feeling of latency) on the Instant-MeiliSearch side. We already know how to improve them, here are: Abort requests meilisearch-js-plugins#588 and Add option to re-fetch on every next-page and load more. meilisearch-js-plugins#569. Once they are fixed, this might help the mini-dashboard being faster! Should be done by @bidoubiwa after the strapi work!
  • MeiliSearch is slower since v0.21.0 for some intensive searches because of the words criterion that gathers more candidates for each request. Ex: for the "coco titi" query, MeiliSearch now returns all candidates containing "coco" AND "titi" but also just "coco". Before v0.21.0 MeiliSearch only returns candidates containing "coco" AND "titi". This feature was widely asked, that's why it was added, but core team plans to add an option allowing the users to remove this behavior (beginning of 2022 probably). We'll let you know when it's released since it can interest the mini-dashboard.

However, these both points do not explain why there is a difference in latency between instant-meilisearch alone and the mini dashboard, unfortunately (cf videos in the issue description)

@mdubus mdubus added the needs investigation Needs to take time to understand the issue label Sep 6, 2022
@entrptaher
Copy link

In my mini dashboard, just loading the index list causes the whole page to slow down. It's to be noted I have 1300 indexes as part of the experiment. Each index can have as much as 1000-150k documents, which is noticable in the screenshot. Some of the indexes have 0 documents.

image

@bidoubiwa
Copy link
Contributor

Hey @entrptaher, I see a search request that has been done in the calls. How long do the stats and the search requests take? This would let us now which one of the routes are being stressed in your setup :)

@gmourier
Copy link
Member

gmourier commented Sep 29, 2022

Hey @bidoubiwa 👋

Using the GET /indexes route could help since it can be paginated with offset/ limit since v0.28

@bidoubiwa
Copy link
Contributor

I agree @gmourier ! I was wondering out of curiosity if it was stats that is causing slowness but we should definitely use GET /indexes. @mdubus what do you think?

@entrptaher
Copy link

The requests are fast, but when they render 1300 items, it gets slow. :(

@bidoubiwa
Copy link
Contributor

I think the solution to that would be to lazyload the index list See example and more information here

@bidoubiwa bidoubiwa added bug Something isn't working hacktoberfest and removed needs investigation Needs to take time to understand the issue labels Oct 3, 2022
@vaibhav135
Copy link
Contributor

I would like to do this.

@bidoubiwa
Copy link
Contributor

Feel free to do so @vaibhav135 :) Thanks 🙏

We prefer not assigning people to our issues because sometimes people ask to be assigned and never come back, which discourages the real volunteers contributors from opening a PR to fix this issue.
We will accept and merge the first PR that fixes correctly and well implements the issue following our contributing guidelines.

@vaibhav135
Copy link
Contributor

@bidoubiwa a quick update on this one. I am almost done with it. I am using react-window with react-select. Just need to do little style change and I will be done. Btw I want to know if testing it with 1300 (datasets) is enough or I should go for more.

@bidoubiwa
Copy link
Contributor

Hey @vaibhav135

Since this PR is very old, I'm not sure this is still an issue. In your PR, could you see a big difference in processing time?

@vaibhav135
Copy link
Contributor

vaibhav135 commented Jul 18, 2023

@bidoubiwa Yes definitely, I would say when you have like 1000 or more datasets loaded. The current dropdown is barely usable and super slow. I will attach the before and after once I am done.

@bidoubiwa
Copy link
Contributor

Nice! Thanks a lot :) If you already see some significant improvements, you don't need to test with more. If you still would like to, you can use this one https://github.com/meilisearch/datasets/tree/main/datasets/movies

@bidoubiwa
Copy link
Contributor

Hey @vaibhav135 thanks, indeed it's way faster :)

@meili-bors meili-bors bot closed this as completed in 6b069df Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants