Hacker News new | ask | show | jobs
by om2 3301 days ago
In a sense you're right. But we also want to make sure WebRTC websites don't blow out your battery, and we went to some effort to make sure it uses efficient video encoding/decoding paths. That said, this was not a majority of the effort.
1 comments

Besides battery life, Chrome on the Mac prevents sleep indefinitely sometimes. If you check with pmset -g assertions, you'll see Chrome saying "WebRTC has active PeerConnections".

No thanks Google, you shouldn't get to decide when my PC goes into sleep mode.

I really hope Safari is better than that...

Edit: just as i'm typing this, Chrome has:

pid 19325(Google Chrome): [0x001ccbbb00018b19] 01:55:40 NoIdleSleepAssertion named: "WebRTC has active PeerConnections"

2 hours for... what? I have no idea which page is guilty.

I believe Safari will block sleep only if there's actively playing video or audio in a foreground tab.
That seems more like a leak than normal behaviour.

If you go to Window > Task Manager it'll tell you which PID corresponds to which tab.

It's the main Chrome process, I killed it and all Chrome windows were gone :)

And i wouldn't call it a leak, you need to do extra work to prevent the system from sleeping, so someone did this intentionally.

Oh well, since I had to close Chrome last evening to my computer will sleep, today I opened Safari as my main browser instead. Google annoys too much lately.

I meant that whatever was supposed to clear the wakelock didn't run, thus leaking the wakelock. I really do find your problem odd, I recommend taking a look at your extensions if you want to track it down at some point.

Safari's fine these days though, so you do you.

I've seen 6 hour wake locks as well. From Chrome. Even if it's a leak, why 6 hours?