5 ms·
Regarding the memory argument: better implementations of infinite scrolling, like Facebook, actually replace content with a single element of the same size when
by rahkiin 10y ago
Regarding the memory argument: better implementations of infinite scrolling, like Facebook, actually replace content with a single element of the same size when out of view, to decrease the DOM size. Content in and just around the viewport is still in memory.
I do agree with many of the other arguments though, especially bookmarking/history.
- wyager 10y agoWhen I scroll down an image-heavy Facebook page for a long time, it eventually becomes unusably slow. Something there is taking polynomial time.
- TeMPOraL 10y agoDon't know why you're getting downvoted. It's a fact - when you keep scrolling Facebook, it eventually slows to a crawl. Want a proof? Just go to a profile page of any of your frequently-posting friend and keep scrolling down. Also, given how fast you can scroll back to the beginning, I don't buy the DOM-replacing technique. I've never seen it working on the desktop website.
- elliottcarlson 10y agoBoth Tumblr and Facebook do indeed replace off-page content in the DOM with placeholders. A chrome extension I am making that makes an offline copy of a page will make a snapshot of the page content with the hidden DOM elements in place, as can be seen here: http://i.imgur.com/bwGA0tp.jpg http://i.imgur.com/bwGA0tp.jpg. Also - previously I worked at Tumblr, so familiar with the code base driving the dashboard. While this technique does save on immediate memory consumption, I am sure that maintaining the stack still causes eventual slow downs.
- gregdeveloper 10y agoCould it be because older content is not cache prioritized as much as new content? I would imagine anything after 1 day gets accessed much less than new content.
- Retr0spectrum 10y agoI think `history.pushState()` could get around bookmarking issues.