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

fix: optimize transaction history #1336

Closed
wants to merge 3 commits into from

Conversation

mmrrnn
Copy link
Collaborator

@mmrrnn mmrrnn commented Jan 2, 2025

Whole history component was rerendered when user hover over balance to see decimals.

  • added react-window so we don't render all items at once. Instead, we render additional elements only when user scrolls down
  • split components to separate rerendering so we rerender only specific part of the tree that has changed
  • added memoization for history component

We can go further and implement infinite scrolling with fetching elements partially when scrolling:
https://codesandbox.io/p/sandbox/r7rp40n0zm?file=%2Fsrc%2Findex.js%3A19%2C35

@mmrrnn mmrrnn marked this pull request as ready for review January 2, 2025 15:17
Copy link
Collaborator

@PanchoBubble PanchoBubble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice virtualization was needed there, works great on mac

@mmrrnn
Copy link
Collaborator Author

mmrrnn commented Jan 16, 2025

Currently I'm working on even better approach of this(pagination, not just virtualization in React). We can either merge it and replace with better solution after that, or wait for combined improvement

@mmrrnn
Copy link
Collaborator Author

mmrrnn commented Jan 17, 2025

#1343 another iteration of this fix is already done. This can one can closed

@mmrrnn mmrrnn closed this Jan 17, 2025
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

Successfully merging this pull request may close these issues.

3 participants