by alan_n · 8y ago · 0 comments
If you're browsing something that's content heavy (lots of pictures/videos) there's usually a point after a certain number of "pages" where my phone just can't take so many things loaded at once and it crashes. Not all sites have this problem, some are really bad (\cough\ tumblr \cough\) but it makes me avoid infinite scrolling sites at all costs. The ones with "Read More" are slightly better (the crash doesn't happen unexpectedly x pixels from the bottom), but still have this problem.
I thought at one point unloading the content at the top might help, but I'm not so sure now. Discourse forums do something like this, where they only load what you're viewing but it feels weird, like it's loading things it's already loaded. Sometimes I do want to scroll to the bottom of something and feel like it's all loaded everything for offline reading.
But overall by far I prefer sites/blogs that have paginated content.
I'm running infinite scroll in production serving thousands of photos and it works pretty well, constant 60fps, low memory consumption and you could literally scroll infinitely (given infinite content).
I've created various pages that sorta unrenders content, but all of them break the browser's find.
If you inspect you will notice that previous invisible items are represented by a single large div who's height increases as more items are scrolled out of view.
Right now nightly says (9k posts)
│ ├──434.20 MB (48.20%) -- top(<anonymized-4294967585>, id=4294967297)
│ │ ├──429.00 MB (47.62%) -- active/window(<anonymized-4294967585>)
│ │ │ ├──292.77 MB (32.50%) -- layout
│ │ │ │ ├──109.99 MB (12.21%) ++ computed-values
│ │ │ │ ├───77.96 MB (08.65%) ++ style-structs
│ │ │ │ ├───71.80 MB (07.97%) ++ frames
│ │ │ │ ├───23.33 MB (02.59%) ++ (8 tiny)
│ │ │ │ └────9.70 MB (01.08%) ── text-runs
│ │ │ ├──121.27 MB (13.46%) ++ dom
│ │ │ ├────9.52 MB (01.06%) ── property-tables
│ │ │ └────5.44 MB (00.60%) ++ (2 tiny)
Reloading the page with only 100 posts: │ ├───6.14 MB (04.16%) -- top(<anonymized-4294969763>, id=4294967297)
│ │ ├──4.98 MB (03.38%) -- active/window(<anonymized-4294969763>)
│ │ │ ├──2.82 MB (01.91%) ++ layout
│ │ │ └──2.17 MB (01.47%) ++ (4 tiny)
│ │ └──1.16 MB (00.78%) ++ js-zone(0x21964428000)
So at least in this case it's actually Layout and DOM nodes that dominate memory consumption, not the images or javascript.Also I just double checked and it loads content as you scroll which I usually don't want for a forum.
I usually don't complain about the find feature with most infinite scroll sites but only because they don't hijack it. The find feature for discourse is AWFUL just awful.
I don't use any social media to actually read much of anything I'm already following. I use all RSS feeds. No bloated interface. No blackhole of content. The RSS reader I use (inoreader) is technically infinite scrolling now that I think about it, but it's the only instance I don't mind because I usually read it on my desktop, I never scroll back up (I star anything interesting), and who searches new articles?, and there's a good search for finding things again which I almost never use.