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

Restaurants sorting according to their rates is not scalable #27

Open
Mo-Fatah opened this issue Jan 17, 2022 · 0 comments
Open

Restaurants sorting according to their rates is not scalable #27

Mo-Fatah opened this issue Jan 17, 2022 · 0 comments

Comments

@Mo-Fatah
Copy link
Owner

Context

In ViewSearchResult component, The frontend gets the the whole search result of the user's query and sort them according to their rates in the browser.

Problem

This approach is not scalable at all, things can get unpleasant when the search result is large. With large results, the payload of the data transferred will be huge and the sorting algorithms will stall the result more from being viewed to the user.

Idea

I think we should move the sorting of the search result to the backend and chop the results into segments and send them as the user proceed into the search result. This will not be a very fast approach but it will prevent overwhelming the user with a very large dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant