| ▲ | halflife 4 hours ago |
| Don’t know if it’s related to the article, but the chats ui performance becomes absolutely horrendous in long chats. Typing the chat box is slow, rendering lags and sometimes gets stuck altogether. I have a research chat that I have to think twice before messaging because the performance is so bad. Running on iPhone 16 safari, and MacBook Pro m3 chrome. |
|
| ▲ | bschwindHN 7 minutes ago | parent | next [-] |
| Almost certainly running some sort of O(n^2) algorithm on the chat text every key press. Or maybe just insane hierarchies of HTML. Either way, pretty wild that you can have billions of dollars at your disposal, your interface is almost purely text, and still manage to be a fuckup at displaying it without performance problems. |
|
| ▲ | DenisM 3 hours ago | parent | prev | next [-] |
| In the good old days Netflix had "Dynamic HTML" code that would take a DOM element which scrolled out of view port and move it to the position where it was about to be scrolled in from the other end. Hence he number of DOM elements stayed constant no matter how far you scroll and the only thing that grows is the Y coordinate. They did it because a lot of devices running Netflix (TVs, DVD players, etc) were underpowered and Netflix was not keen on writing separate applications. They did, however, invest into a browser engine that would have HW acceleration not just for video playback but also for moving DOM elements. Basically, sprites. The lost art of writing efficient code... |
| |
| ▲ | zdragnar 3 hours ago | parent | next [-] | | > 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. | | |
| ▲ | tmpz22 2 hours ago | parent | next [-] | | 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. | |
| ▲ | dotancohen 2 hours ago | parent | prev [-] | | 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. | | |
| ▲ | jasonfarnon 2 hours ago | parent | next [-] | | 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. | | |
| ▲ | dotancohen an hour ago | parent [-] | | Ctrl-A for select all doesn't work either. I actually wondered how they broke that. |
| |
| ▲ | BoorishBears 2 hours ago | parent | prev [-] | | 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. |
|
| |
| ▲ | groundzeros2015 2 hours ago | parent | prev [-] | | This is how every scrolling list has been implemented since the 80s. We actually lost knowledge about how to build UI in the move to web | | |
| ▲ | bloomca an hour ago | parent [-] | | The biggest issue is that there is no native component support for that. So everyone implements their own and it is both brittle and introduces some issues like: - "ctrl + f" search stops working as expected
- the scrollbar has wrong dimensions
- sometimes the content might jump (common web issue overall) The reason why we lost it is because web supports wildly different types of layouts, so it is really hard to optimize the same way it is possible in native apps (they are much less flexible overall). | | |
| ▲ | TeMPOraL 23 minutes ago | parent [-] | | Right. This is one of my favorite examples of how badly bloated the web is, and how full of stupid decisions. Virtual scrolling means you're maintaining a window into content, not actually showing full content. Web browsers are perfectly fine showing tens of thousands of lines of text, or rows in a table, so if you need virtual scrolling for less, something already went badly wrong, and the product is likely to be a toy, not a tool (working definition: can it handle realistic amount of data people would use for productive work - i.e. 10k rows, not 10 rows). |
|
|
|
|
| ▲ | stacktraceyo 4 hours ago | parent | prev | next [-] |
| Same. It’s wild how bad it can get with just like a normal longer running conversation |
|
| ▲ | moffkalast 3 hours ago | parent | prev [-] |
| Yeah just had this earlier today, I had to write my response in vscode and paste it in, there were literal seconds of lag for typing each character. Typical bloated React. |
| |
| ▲ | scq 3 hours ago | parent [-] | | Just because a web application uses React and is slow, it does not follow that it is slow because of React. It's perfectly possible to write fast or slow web applications in React, same as any other framework. Linear is one of the snappiest web applications I've ever used, and it is written in React. | | |
| ▲ | brigandish 2 hours ago | parent [-] | | Does not, in the seeming absence of other snappy examples and the overwhelming evidence of many, many slow React apps, the exception prove the rule? | | |
| ▲ | scq 2 hours ago | parent [-] | | There are plenty of snappy examples. Off the top of my head: Discord, Netflix, Signal Desktop, WhatsApp Web. |
|
|
|