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

Cache generation data in frontend #49

Open
2 tasks
GoelBiju opened this issue Apr 5, 2021 · 2 comments
Open
2 tasks

Cache generation data in frontend #49

GoelBiju opened this issue Apr 5, 2021 · 2 comments
Labels
Backend Issues related to the server/database enhancement New feature or request Frontend Issues related to the frontend application Not MVP This is not part of the MVP and less urgent question Further information is requested

Comments

@GoelBiju
Copy link
Owner

GoelBiju commented Apr 5, 2021

Description:

We need to be able to store generation data in the frontend state especially if we require previous generation data for the visualisation. If we change to storing data in the frontend we can just request the generation data we need by giving a list of the generations to the server and then add the data to the state when we receive it.

This avoids receiving the information we already have and means we won't have to make further requests to the server for the same data during replays or when seeking when using the generation slider.

Acceptance criteria:

  • Store generation data in the frontend after requests are made,
  • Use the stored data next time it is needed when seeking or replays are made.
@GoelBiju GoelBiju added enhancement New feature or request Frontend Issues related to the frontend application Backend Issues related to the server/database labels Apr 5, 2021
@GoelBiju
Copy link
Owner Author

GoelBiju commented Apr 5, 2021

The only potential downside to this is storing a lot of information (thousands of arrays of numbers) on the frontend state which could make the client slow but this needs to be tested and this may not be the case. It could be that it does not impact performance too much or there is a faster way of storing large amounts of data in the frontend using other libraries. The other solution would be to have a limit on the maximum data we store on the frontend (or rank it based on which were used last). If we hit the maximum amount of data to store on the frontend, we remove the earliest or the least used data and request the data we need from the server again and store it. This needs to be clarified further.

@GoelBiju GoelBiju added the Not MVP This is not part of the MVP and less urgent label Apr 6, 2021
@GoelBiju GoelBiju added the question Further information is requested label Dec 2, 2021
@GoelBiju
Copy link
Owner Author

GoelBiju commented Dec 2, 2021

It is possible to implement to make use of react-query in the future to replace Redux to store the optimisation data. This has inbuilt caching as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Issues related to the server/database enhancement New feature or request Frontend Issues related to the frontend application Not MVP This is not part of the MVP and less urgent question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant