top | item 34978729

(no title)

_-david-_ | 3 years ago

>In our testing, we found that you can browse for 17 hours or watch YouTube for 18 hours

I'm quite interested in how YouTube can give more hours than browsing. Is it due to the bloat of modern webpages or something else?

discuss

order

duskwuff|3 years ago

If the user is watching YouTube, the system is spending most of its non-idle time downloading chunks of video, shoveling them into the decoder, and piping the output to the screen. This is a heavily hardware-accelerated workflow, and is quite efficient. The structure of the YouTube web app helps, too; it's a (well disguised) single-page app, so the browser doesn't even have to reload/reparse scripts when navigating from one video to another.

Browsing web pages is much more chaotic. As the user scrolls through the page, the system is having to render parts of the page (on the CPU), evaluate CSS rules, run scripts... the works. When the user navigates to a new page, that's a whole bunch of new HTML, CSS, and scripts that have to be parsed. And so on.

Scoundreller|3 years ago

I think a big part of it is just the smooth scrolling. On my iPhone, I can see power draw double as I scroll. (My charger displays this).

I remember having to disable smooth scrolling when I had a computer barely capable of playing mp3s.