Thursday, August 17, 2006

Someone write this Firefox plugin

I browse with a lot of Firefox windows open and each with many tabs.I probably never have fewer than a dozen tabs open across three ormore windows. Often, I'll have 50+ tabbs open, and usually Firefoxdoes alright. Some web sites, however, behave poorly. Whether Flash,animated images or most often, JavaScript, they use up CPU when I'mnot looking at them. In some cases, this is legitimate andreasonable. I like the fact that Gmail checks for new mail and isalways reasonably up to date. However, several sites use CPU for nogood reason. For example, the old BGG menu system (which Scott hasthankfully replaced) called setInterval with a timeout of30ms. For a menu system. Other web sites are worse.Unfortunately, isolating this sort of problem is hard when you have 30tabs open. I can see Firefox using 50% CPU, but why?

So, someone needs to write a Firefox "process monitor". It's notexactly a standard process monitor, in that JavaScript lacks typicalprocesses, but it would provide a few things. First, it would providea list of current setInterval and setTimeout callsby origin, original scheduled time and remaining time. Second, itwould provide some ability to pause (or even auto-pause, when not inthe foreground) tabs from using CPU resources. This would make faultisolation easier and would be useful to say, pause everything otherthan Gmail. Finally, if possible, it would provide some estimate ofCPU usage on a per-open-page basis, like a traditional processmonitor. Right now, Firefox pops up the "unresponsive script" warningat some threshhold, so I'm hoping there's some ability to measure theusage in a more granular way. I don't know enought about SpiderMonkeyto know how feasible any of this is, but I really need it, especiallyas more and more nice JavaScript heavy "Web 2.0" apps appear.

For now, Venkman, the JavaScript debugger is of some assistance, butnot nearly as much as I'd like. Is there some other tool out thereI'm not finding that offers some of this capability? Anyone care to write one?

Personal

Professional

I am a Engineering Director at Google. My team and I work on Search.

Previously, I was the CTO at an 802.11 location and security company, Newbury Networks in Boston. In June, 1999 I received my Masters degree from the MIT Media Lab. I graduated from MIT (undergraduate) in June, 1997, in physics. Prior to that I was CTO of net.Genesis from 1994 to 1996.