Investigate whether janky scrolling can be avoided with elements that resize
SyntaxColoring opened this issue · comments
Max Marrone commented
We're currently eagerly buffering all entries into memory so that, when they come into view, we can render them immediately without an await
I/O call. This is all to avoid janky behavior with our virtualized scrolling library.
Lines 118 to 122 in 59915ef
This is really unfortunate because it consumes a lot of memory.
Open questions:
- Is there a way to tune our current library (React Virtuoso) to handle this case better?
- Is there another library that handles this case better?
If the answers to these questions are both "no," we still have other options. Like:
- Mitigate memory consumption by buffering only the messages, not the timestamp or other metadata.
- Add a "low-memory mode" where line wrapping is disabled. Then, we would precompute the height of each entry by counting the number of
\n
characters in the message.