News for hackers. Stuff that matters.
Re:ChatGPT won't let you type until Cloudflare reads your Re... by zdragnar on Sunday March 29, 2026 @06:44PM (#47568221)
> Hence he number of DOM elements stayed constant no matter how far you scroll and the only thing that grows is the Y coordinate.

This is generally called virtual scrolling, and it is not only an option in many common table libraries, but there are plenty of standalone implementations and other libraries (lists and things) that offer it. The technique certainly didn't originate with Netflix.

Re:ChatGPT won't let you type until Cloudflare reads your Re... by dotancohen on Sunday March 29, 2026 @07:26PM (#47568547)
And yet ChatGPT does not use it.

GP was mentioning that a solution to the problem exists, not that Netflix specifically invented it. Your quip that the technique is not specific to Netflix bolsters the argument that OpenAI should code that in.

Re:ChatGPT won't let you type until Cloudflare reads your Re... by jasonfarnon on Sunday March 29, 2026 @07:45PM (#47568684)
I'm ignorant of the tech here. But I have noticed that ctrl-F search doesn't work for me on these longer chats. Which is what made me think they were doing something like virtual scrolling. I can't understand how the UI can get so slow if a bunch of the page is being swapped out.
Re:ChatGPT won't let you type until Cloudflare reads your Re... by dotancohen on Sunday March 29, 2026 @08:34PM (#47569037)
Ctrl-A for select all doesn't work either. I actually wondered how they broke that.
Re:ChatGPT won't let you type until Cloudflare reads your Re... by BoorishBears on Sunday March 29, 2026 @07:43PM (#47568668)
They didn't actually name the solution: the solution is virtualization.

They described Netflix's implementation, but if someone actually wanted to follow up on this (even for their own personal interest), Dynamic HTML would not get you there, while virtualization would across all the places it's used: mobile, desktop, web, etc.

Re:ChatGPT won't let you type until Cloudflare reads your Re... by tmpz22 on Sunday March 29, 2026 @07:41PM (#47568656)
Its been about three years but infinite scroll is naunced depending on the content that needs to be displayed. Its a tough nut to crack and can require a lot of maintenance to keep stable.

None of which chatgpt can handle presumably.

Re:ChatGPT won't let you type until Cloudflare reads your Re... by weird-eye-issue on Monday March 30, 2026 @04:47AM (#47571970)
Yes, tables and lists, since they have a fixed height per item/row. Chat messages don't have a fixed height so its more difficult. And by more difficult I mean that every single virtual paging library that I've looked at in the past would not work.
Re:ChatGPT won't let you type until Cloudflare reads your Re... by amluto on Monday March 30, 2026 @07:56AM (#47573117)
But they do have constant height in the sense that, unless you resize the window horizontally, the height doesn’t change.

For what it’s worth, modern browsers can render absurdly large plain HTML+CSS documents fairly well except perhaps for a slow initial load as long as the contents are boring enough. Chat messages are pretty boring.

I have a diagnostic webpage that is a few million lines long. I could get fancy and optimize it, but it more or less just works, even on mobile.

Re:ChatGPT won't let you type until Cloudflare reads your Re... by weird-eye-issue on Monday March 30, 2026 @09:54AM (#47574379)
Exactly, browsers can render it fast. It's likely a re-rendering issue in React. So the real solution is just preventing the messages from getting rendered too often instead of some sort of virtual paging.
Re:ChatGPT won't let you type until Cloudflare reads your Re... by zdragnar on Monday March 30, 2026 @10:01AM (#47574475)
Dynamic height of virtual scrolling elements is a thing. You just need to recalculate the scrollable height on the fly. tanstack's does it, as do some of the nicer grid libraries.
Re:ChatGPT won't let you type until Cloudflare reads your Re... by weird-eye-issue on Monday March 30, 2026 @10:41AM (#47574992)
To be fair I haven't looked at any solutions in about a decade lol