News for hackers. Stuff that matters.
Re:Infinite Scrolling: When to Use It, When to Avoid It by spookthesunset on Saturday September 10, 2022 @11:18AM (#32791394)
Gigabytes of memory yes but there is load time and render time too. And rendering a 120mb payload of items and their thumbnails before I can even view the top of the page seems… not the best user experience.

I don’t think there is an easy answer here. All options have some trade offs.

Re:Infinite Scrolling: When to Use It, When to Avoid It by _cd on Saturday September 10, 2022 @12:26PM (#32792046)
Typically when I serialize data for #index endpoints I return much slimmer payloads than I do in #show endpoints. I recognize that 120mb was an extreme, but you should be able to serialize lists of 500+ items into well under 1mb, with enough data to render your list view thumbnails/links.

I always thought the infinite scroll pattern was designed for analytics purposes. So that you can track user engagement. Not because technology constraints necessitated it or that it was a good user experience.

Re:Infinite Scrolling: When to Use It, When to Avoid It by NLPlatypus on Monday September 12, 2022 @07:57AM (#32808824)
Just have JS track where the user is?
Re:Infinite Scrolling: When to Use It, When to Avoid It by jandrese on Saturday September 10, 2022 @01:19PM (#32792587)
Deferring rendering of the images seems like an easy enough thing to do if your alternative is infinite scrolling. Pre-load the text and layout but leave the images and video until they're close to the viewport.
Re:Infinite Scrolling: When to Use It, When to Avoid It by xorcist on Saturday September 10, 2022 @11:44AM (#32791646)
That is not how browsers work. The browser will render the viewport immediately, long before the page has loaded. It will also load the visible thumbnails first, unless made impossible by complicated markup of course. Otherwise surfing the web on dialup in 1996 would have been intolerable.
Re:Infinite Scrolling: When to Use It, When to Avoid It by shadowgovt on Saturday September 10, 2022 @12:27PM (#32792060)
Sooner or later you have to unload content or the browser crashes. There's an upper limit to how many DOM elements browsers can handle, even with modern optimizations.