While it's anti-pattern in Tangled, a PR can theoretically include super large diff. Instead of trying to render it in one-go, it would make sense to use lazy-loading here.
Monorepo for Tangled
tangled.org
lazy-load PR diff #291
open
opened by
boltless.me
boltless.me
(author)
By lazy-loading I was thinking of just asynchronously loading diffs immediately after the PR page load. Sorry if I miss-used the term.
Basically just hx-trigger="load" and not depending on user scroll. This way, ctrl+f will just work once all diffs are loaded.
i like the sound of this, although i'd really not want to lose ctrl+f on large PRs, that is usually when i need it the most. there are a few easy ways to reduce the number of generated DOM nodes in the diff view, we should take a crack at those first. we presently render 3 nodes per line i believe (the symbol, the line number, the line itself), but if we can bring this down, it might render faster!