4 ms·
That was very enjoyable. I think the tldr is that they use custom scrolling via translate3d, limit any computation on the file to just the visible lines, and th
by rcme 4y ago
That was very enjoyable. I think the tldr is that they use custom scrolling via translate3d, limit any computation on the file to just the visible lines, and they split the text into lines with regex to leverage native loops instead of trying to split the next manually via JS. Mono-spaced font probably makes this problem a lot easier as measuring text is pretty trivial.