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

⚡ Improve WebUI performance in Stream view #49

Merged
merged 5 commits into from
Sep 2, 2024

Conversation

linkdd
Copy link
Contributor

@linkdd linkdd commented Sep 2, 2024

Decision Record

See #30

Trying to render a huge number of rows in the DOM will consume insane amounts of memory and with enough logs, the browser tab can even run out of memory.

Instead, we need to only render the rows that are actually visible. To do this, instead of rendering the rows in the <tbody/>, we render them into a <template/> so that they are not added to the DOM nor rendered. Then, we rely on Virtual Scroller to display the correct rows with the correct padding in the <tbody/>.

With this change, we are able to handle an unbound number of rows (this has been tested with 130,000+ rows, and the performance is really smooth).

Changes

  • ➕ Add Virtual Scroller
  • ♻️ 💄 Render rows in <template/> instead of <tbody/>
  • ⚡ Render only visible rows with Virtual Scroller
  • 🔖 v0.8.0

License Agreement

  • I guarantee that I have the rights on the code submitted in this PR
  • I accept that this contribution will be released under the terms of the MIT License

@linkdd linkdd added this to the 1.0.0 milestone Sep 2, 2024
@linkdd linkdd self-assigned this Sep 2, 2024
@linkdd linkdd merged commit 496275c into main Sep 2, 2024
2 checks passed
@linkdd linkdd deleted the webui-perf-virtual-scroll branch September 2, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

🐛 ⚡ Poor performance in WebUI when there are thousands of logs to display
1 participant