⚡ Improve WebUI performance in Stream view #49
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
<template/>
instead of<tbody/>
License Agreement