News for hackers. Stuff that matters.
Re:On Rendering Diffs by cvince on Friday May 29, 2026 @04:36PM (#48328890)
Whatever happened to all the pretext hype? I feel like that would be perfect for rendering huge diffs.
Re:On Rendering Diffs by amadeus on Friday May 29, 2026 @04:44PM (#48328992)
Yes and no. It would help to improve things a bit when it comes the measure/reconciliation phase (unclear to say how much). However we've already done a pretty good job around batching writes vs reads.

However passing a million lines of code through pretext is unlikely to be very efficient, so a lot of the work around estimation is still very important.

That said, while I don't want to make pretext a direct dependency of the library, there's a good chance I'll explore the possibility of allowing devs to pass it in as an additional argument perhaps improve performance a bit.

It should also be noted that we have a full API to support things like line annotations (comments, etc) that are entirely controlled by the user, so there's always a bit of a dynamic aspect there that would come into play

Re:On Rendering Diffs by cvince on Saturday May 30, 2026 @08:14PM (#48341859)
I think it's amazing how deep you can go in something as simple as rendering diffs, and I'm really grateful you shared that writeup (in fact I've been following you loosely since the Kiip days as a then aspiring designer+developer type).

I've always been curious how products like ag-grid are able to allow you to lazy-load 10,000,000+ rows in a table without the blanking you described, and I imagine this type of method describes how it can be done.

Re:On Rendering Diffs by taejavu on Friday May 29, 2026 @04:44PM (#48329000)
Can you select and copy text with pretext?
Re:On Rendering Diffs by cvince on Saturday May 30, 2026 @08:15PM (#48341863)
Of course you can. It doesn't replace the dom, just changes how it's calculated. https://chenglou.me/pretext/dynamic-layout/