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

Get rid of unnecessary requests by role #92

Open
OlegPhenomenon opened this issue Jul 5, 2021 · 0 comments
Open

Get rid of unnecessary requests by role #92

OlegPhenomenon opened this issue Jul 5, 2021 · 0 comments

Comments

@OlegPhenomenon
Copy link
Contributor

In general, the application works as it should, the user can surf the site and there will be no additional load of the entire list of domains. But the situation is as follows: when a user changes roles in a filter, then the server is contacted for a new list of domains depending on the role.

Let's say that for the "registrant and admin" filter the user received 2000 domains, then he needed to switch the filter to "all roles" and then he will receive, for example, 3400 domains.

Then he again decided to switch the filter to "registrant and admin" and then the request will be re-sent to the server. But why? If he received the entire list of domains with the filter "all roles", it no longer makes sense to contact the server again when he has a list of domains and he can filter the required number of domains within the frontend.

At this point, it might think that storing a large number of domains on the frontend side can eat up a lot of memory. But, there is no such case, the maximum number of domains that a registrant has is about 3500. When the number is several times larger, then we can think about another case, how to keep these domains: in the cache or in local storage, or connect a GraphQL unit in general to receive only the data that is needed.

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