inessential by Brent Simmons

Browser CPU usage

One thing that bugs me — some pages use an abnormal amount of the CPU even when they’re not apparently doing anything.

For instance, open this page on Mashable. (Not to pick on them: I like Mashable a ton and subscribe to their feed.)

Once the Flash thing has loaded, run top or Activity Monitor and watch Safari’s CPU usage. On my laptop, it goes up and down, but it’s around 13%. Even though nothing is going on.

Then close the page — Safari’s CPU usage immediately backs down.

It’s not just Flash causing the problem.

- I disabled plug-ins and reloaded the page, and CPU usage was around 7% in this case.

- Then I disabled JavaScript and reloaded the page. CPU usage went down to around 3%.

- Then I turned off image display and reloaded the page. Ah, now we’re down to 0%.

The thing is, web developers should test their pages for CPU usage the same as app developers do. And anytime a page is idle, CPU usage should be at 0%. Same as with any other app.