jducoeur: (Default)
jducoeur ([personal profile] jducoeur) wrote2014-04-12 10:37 am
Entry tags:

Anyone know why Chrome (maybe Javascript) sometimes goes haywire when it sits in the background?

I'm one of those people who tends to have open tabs in my browser. Like, *lots* of open tabs. Like, 50 or more.

I'm not sure if it's a recent change, but the past week I've been noticing a tendency for Chrome to start chewing 50% of my CPU (that is, two cores) when I'm not doing anything. When I investigate, it always seems to be that two tabs that are *not* currently on top are each eating 25% of CPU. It's not the same tabs each time, but it does always seem to be "heavy" pages that are likely to be full of Javascript. The problem usually goes away simply by finding and clicking on that tab, bringing it to the front. My best guess is that the Javascript on these pages is getting into some kind of frantic loop, doing something that isn't allowed while it's in the background, but that's just a guess.

Anybody have any concrete ideas what is happening here? I ask mostly out of idle curiosity, but also because there may be an anti-pattern that I want Querki to avoid...

[identity profile] etherial.livejournal.com 2014-04-12 03:35 pm (UTC)(link)
Fascinating. I have Chrome on Windows 7 with 3 different user profiles active most of the time (though I admit, I usually cap out at 15 tabs per profile) and have noticed no issues. On Ubuntu, however, it blows up daily.

[identity profile] serakit.livejournal.com 2014-04-12 04:51 pm (UTC)(link)
I have no idea why, but it does it to me too, but with flash-- I go and end whatever process is chewing up memory or CPU (it varies which one it starts chewing) and I get "Shockwave flash has crashed" as a result. It's been doing that for months if not years, on an irregular basis.

[identity profile] eclecticmagpie.livejournal.com 2014-04-12 05:23 pm (UTC)(link)
I believe I've seen similar behavior under OSX (older versions 10.5 and 10.6), also associated with Flash. I tend to run a flash-blocker now, which seems to help, but I haven't done any serious testing. I run LOTS of tabs in multiple windows.

[identity profile] hfcougar.livejournal.com 2014-04-12 06:59 pm (UTC)(link)
The same thing happens to me. I haven't figured it out either (except when it's Facebook, the most obvious culprit).

I also have it happen that when I end what looks like the most rogue process in Task Manager, it either crashes Flash or crashes Chrome entirely.

I feel like Flash might be the culprit rather than Javascript but I don't have a lot of solid evidence for that guess. Sometimes there'll be a tab with a video clip in it somewhere and if I load the tab while looking at it, nothing happens, but if I load it in the background, the video starts playing itself unbidden. Not only annoying but it gives me a variety of concerns.
laurion: (Default)

[personal profile] laurion 2014-04-12 07:22 pm (UTC)(link)
I use chromium,and on a different OS, so I haven't seen the same issue, but related ones. Chrome does have it's own built in process monitor that you can launch to get more insight into exactly what is going on...
Edited 2014-04-12 19:23 (UTC)

[identity profile] calygrey.livejournal.com 2014-04-12 10:29 pm (UTC)(link)
Yep, happens to me fairly regularly.
tpau: (Default)

[personal profile] tpau 2014-04-13 12:44 am (UTC)(link)
does not happen to me under win7 on several machined but what i DO get is thta it eats like 90% of my MEMORY (rather then cpu) regularly. nom. i tend to have anywhere form 30 to 50 tabs open