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

[Feature]: Perf optimization for huge list/tree using virtualization in Rsdoctor App #400

Open
denniscual opened this issue Jun 28, 2024 · 1 comment
Labels
✨ enhancement New feature or request
Milestone

Comments

@denniscual
Copy link

denniscual commented Jun 28, 2024

What problem does this feature solve?

Currently, whenever the Rsdoctor Analyzer App renders a huge list or tree like the "Imported Reasons Tree", it takes longer to render the tree. I also experienced this when expanding all of the modules of a huge js asset. The asset is 7mb+ and created by a huge number of node modules. Worst case, the app is lagging which makes it unusable. This makes it hard to use the analyzer. Below is a Chrome Profiler Metrics I gathered when clicking the "expand all" button in Module Tree pane.

Screenshot 2024-06-28 at 11 18 32 PM

The "Long tasks" took almost 6 seconds and then another 2 seconds before it painted the changes on the screen. It caused by trying to render a huge number of List Items in a single render pass and then paint it once. Time slices like transition can't help here. So my suggestion is to use "Virtualization" to reduce the number of list items and only render the items that are visible in the viewport.

What does the proposed API look like?

The issue is for enhancing the UX in the Rsdoctor Analyzer App not an additional API.

@easy1090
Copy link
Collaborator

easy1090 commented Jul 2, 2024

I'm sorry for the bad experience. We will optimize and reconstruct this part later.

@easy1090 easy1090 added this to the 1.0.0 milestone Jul 16, 2024
@easy1090 easy1090 added ✨ enhancement New feature or request and removed 💡 feature need reproduction labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants