Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As soon as firefox gets per process tabs in stable I'll switch back, I really want to switch from chrome but that's a deal killer for me.


Mozilla is currently testing Electrolysis (or "e10s") [1] - their project to run web content in a separate process - on nightly, and I've been using it for the past few weeks. It's getting pretty reasonably stable, so hopefully we'll see it in a release version soon enough. According to [2], the tentative plan is for Electrolysis to be released with Firefox 36.

[1] https://wiki.mozilla.org/Electrolysis

[2] http://www.ghacks.net/2014/07/12/mozilla-plans-release-elect...


I've used the nightlies before and had poor luck with them, once e10s goes mainline I'll probably make the switch.


I could survive without processes-per-tab, if Firefox gave some hint – any hint! – which tabs are being naughty. Maybe just a per-tab counter of allocations, or timeouts, or DOM edits, or some other operation? Anything that serves as a proxy for "more active than average while not in foreground".


Yeah, Firefox really needs some sort of "top". Right now, idling, my Firefox is taking between 20% and 40% of my CPU. I'm sure it's some tab running some dumb javascript, but there's no way for me to figure out which one. Sad, because spidermonkey must know which window a javascript context is associated with, so it could feasibly keep track of run time.


SpiderMonkey itself actually has no concept of windows at all. So it doesn't know what window anything has to do with.

The browser itself does, though. Some sort of "top"-like utility is in fact being worked on, for both websites and extensions.


Yeah, but it knows the global "window" object. That's enough for it to keep track of stuff. Let the browser correlate that global object with an actual UI window/tab.


If a script hangs, Firefox has a little popup on that tab that asks if you want to kill it or let it keep running. So something in the browser knows which tabs are JS-intensive.


Sure. That particular setup has pretty low overhead and hence also low granularity; it's not measuring intensive or not but just how long a script has been running when a timer on a background thread fires. So your script could be eating up all the CPU but just returning to the event loop every few seconds and the hung script dialog would never notice.


In my experience, with vanilla firefox on a desktop (linux, i7), 1 tab with twitter open takes about that much processor power.


It's not exactly what you're looking for, but try going to about:memory and hitting Measure. It gives per object allocations:

    │  ├────6.04 MB (01.59%) -- top(https://news.ycombinator.com/item?id=8518903, id=105)
    │  │    ├──5.89 MB (01.55%) -- active/window(https://news.ycombinator.com/item?id=8518903)
    │  │    │  ├──4.64 MB (01.22%) ++ layout
    │  │    │  └──1.25 MB (00.33%) ++ (4 tiny)
    │  │    └──0.15 MB (00.04%) ++ js-zone(0x7fb875a85800)


Unfortunately, the 'problem tabs' rarely seem correlated with standout numbers on that readout, but rather some other ongoing activity.


Use the profiler in the developer tools. Run it for a short while (e.g. 10 seconds) and look at the results. The tab using the most CPU resources will be at the top of the result tree.


That's quite useful!

I just gave it a try in a current, Firefox-not-being-sluggish state, and it seems it may be a bit hard to correlate profiler lines to exact tabs. (For example, 7 of the top 13 rows that had domains associated were Google-API-related, but I don't think they're being used from Google pages...) Still, when I next enter a laggy state perhaps this will help finger the culprit(s) unambiguously. Thanks!


  As soon as firefox gets per process tabs in stable I'll switch back

As strange as it sounds, this is a reason why I don't use chrome as my "default" browser. I seem to find the web sites that leak resources and leave them open in tabs (one of my projects at work is a big culprit too). With firefox a runaway tab or two simply results in a single CPU pegged at 100% and max about 2GB of ram consumption. With chrome it will peg out a couple CPU's and eat RAM until my machine goes into swap. Usually this happens while I'm gone so simply unlocking the screen is a painful process as everything gets swapped in.

In other words I prefer having to kill firefox on a regular basis because its run out of RAM, than to have to reset my machine because its taking 10 minutes to unlock the screen.


The default for Firefox will be to have only 2 processes, one for chrome and one for the tab content. So it won't have that disadvantage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: