Skip to content

Get rid of unnecessary requests by role #92

@OlegPhenomenon

Description

@OlegPhenomenon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions