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

Thoughts about performance #69

Open
4 of 5 tasks
NdibeRaymond opened this issue Apr 24, 2022 · 0 comments
Open
4 of 5 tasks

Thoughts about performance #69

NdibeRaymond opened this issue Apr 24, 2022 · 0 comments

Comments

@NdibeRaymond
Copy link
Collaborator

NdibeRaymond commented Apr 24, 2022

This is a sketch, will update as I do figure out more about where to make improvements:

  • Consider using "window" technique.

As the DOM get's larger, the ui tends to get slower. This indirectly translates to "The more time spent using the ui without closing, the slower it gets". This shouldn't be so. ways to fix this includes:

  • research on how "window" technique can be used to only have nodes that are enough to cover the viewport in the dom at a given point in time.
  • Research already existing solutions that can solve this issue? (react-window,
    react- virtualized, any other solution?)
  • What happens if the existing solutions can't handle the complexity of our dom? build in-house solution?
  • Investigate how Json parsing is currently being done and find better solutions.
  • use lodash cloneDeep vs JSON.parse(JSON.stringify()) vs custom deep clone method? actual bench-marking will be useful here. JSON.parse(JSON.stringify()) seems to be the slowest from experience.
  • Ensure that state mutation is not taking place anywhere in the app.
    Before assigning value to object read from store or state, always deep clone the object.
  • Spend some time in the gut of the application and try to weed out inefficiencies in the way server interaction is being done.
  • Try to ensure that useEffect only listens to values that are absolutely necessary for it's operation and nothing else.
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