andrewducker: (Default)
[personal profile] andrewducker
My email app (Thunderbird) takes up 1-2% of CPU to sit there happily checking and displaying email.
GMail running in Firefox takes up 35% of CPU.
Winamp will stream internet radio while taking up 2-3% of CPU
Deezer (flash music streaming site) in Firefox takes up 40% of CPU to do the same thing.

I know that Flash is going to be less efficient than something running separately - but why the hell is it 10x slower?  And the same with AJAX - why on earth does sitting there with a connection to google, doing nothing, take up that much CPU?

Date: 2008-12-12 09:37 am (UTC)
From: [identity profile] channelpenguin.livejournal.com
yet another reason AJAX is evil. :-)

IMO, if you want to write an app that's as responsive as a winforms app - then just write one - much quicker and easier... and with ClickOnce for installs/updates the one real issue there went away (to my mind).

Date: 2008-12-12 09:45 am (UTC)
drplokta: (Default)
From: [personal profile] drplokta
Gmail's not doing nothing, it's continually polling for new mail, as you'll see if you receive new mail while it's "doing nothing".

Date: 2008-12-12 09:49 am (UTC)
ext_58972: Mad! (Default)
From: [identity profile] autopope.livejournal.com
How are you doing AJAX from inside Thunderbird?

I use GMail with Tbird by pointing Tbird at imap.gmail.com and smtp.gmail.com just like any other mail service. And no, I am not seeing stupid CPU usage figures as a result of that.

Date: 2008-12-12 09:50 am (UTC)
drplokta: (Default)
From: [personal profile] drplokta
I'm assuming that's a typo, and he means Firefox.

Date: 2008-12-12 09:52 am (UTC)
drplokta: (Default)
From: [personal profile] drplokta
It's certainly more than once a minute -- try sending yourself test emails from other accounts and see how long it takes Gmail to notice.

Date: 2008-12-12 11:45 am (UTC)
From: [identity profile] figg.livejournal.com
Something that uses more cpu isn't necessarily slower.


The answer is that the other applications are doing more (like say interpreting a language) on top of the existing task.

Date: 2008-12-12 11:53 am (UTC)
From: [identity profile] figg.livejournal.com
For example:

Winamp is written using the native window controls, with some customization on the top, and a fairly refined mp3 decoder.


Firefox is running ontop of XUL/Javsscript to define the user interface components and the interactivity.

This is then loading a third party component to run an actionscript vm telling it what to connect to and what to do with it.


It is a bit like asking why a lorry has a bigger engine than a car because they both drive on roads.

Date: 2008-12-12 11:55 am (UTC)
From: [identity profile] call-waiting.livejournal.com
A couple of suggestions:
1. Extensions. I don't have many extensions, and when I leave ff sitting on gmail, after it's all loaded up, it consumes less than 1% of my CPU, with occasional blips of up to about 10%.

Firefox extensions have to go through XUL, Javascript, and all manner of bits of interface that will inherently slow down their operation. I suspect you just have an extension that's badly written.

2. Garbage collection. Particularly if you have extensions that are haemorragging objects.

My suggestion: try disabling extensions in turn and see which ones make a difference.

Date: 2008-12-12 12:05 pm (UTC)
From: [identity profile] zombywuf.livejournal.com
Do you have any other Firefox tabs open? Anything with a flash banner ad (even it's just displaying a static image) can chew your CPU horribly. Your flash music player is chewing CPU because it's flash, which is notorious for its inefficiency. Especially as it's often written by web developers who wouldn't know a big O if it hit them in the face.

Date: 2008-12-12 12:08 pm (UTC)
From: [identity profile] figg.livejournal.com
If you are running firebug it is a likely culprit.

Date: 2008-12-12 01:25 pm (UTC)
ext_3241: (Default)
From: [identity profile] pizza.maircrosoft.com (from livejournal.com)
maybe it means his cpu is 3-30 times bigger than yours.

Date: 2008-12-12 03:32 pm (UTC)
From: [identity profile] princealbert.livejournal.com
Isn't it not due to the fact that these sandboxed apps have to do their own garbage collection etc etc

Which is handled by the native app when it wants to and can be optimized but by Flash apps the application has no real control so Flash is constantly doing housekeeping, and so is the app Flash is embedded in.

After all you are running a sandbox inside a sandbox how in hell is that going to be effecient?

Date: 2008-12-12 04:29 pm (UTC)
From: [identity profile] robhu.livejournal.com
Yes, Gmail uses Comet.

Date: 2008-12-12 04:30 pm (UTC)
From: [identity profile] robhu.livejournal.com
I think the Google JS apps tend to leak over time. Try restarting your browser, and seeing if it still uses so much CPU.

Date: 2008-12-12 04:31 pm (UTC)
From: [identity profile] robhu.livejournal.com
It's not size, it's what you do with it (i.e. don't run Java).

Date: 2008-12-12 04:33 pm (UTC)
From: [identity profile] robhu.livejournal.com
I would expect the MP3 playback (which is the expensive bit) in Flash to be done via a Flash API call which actually runs native x86.

Of course the app could be doing something else that is stupid.

Date: 2008-12-12 04:36 pm (UTC)
From: [identity profile] robhu.livejournal.com
Have you tried running Gmail in Chrome and using the 'process viewer' in Chrome?

Date: 2008-12-12 04:43 pm (UTC)
From: [identity profile] robhu.livejournal.com
1.7-2.0% CPU utilisation in Safari 3 on a C2D running at 2.4Ghz.

Date: 2008-12-12 04:56 pm (UTC)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)
From: [personal profile] matgb
The common factor here is Firefox. It's a resource hog, and the more plugins you put in, the more resources it hogs.

I say this as someone notorious for fifteen billion plugins running on a piss poor outdated system. Restarting Fx every few hours is the only way my older PC can keep running.

Fx+flash+plugins+AJAX+gmail? You're doomed, if it matters.

Date: 2008-12-12 06:45 pm (UTC)
From: [identity profile] kurosau.livejournal.com
I've never really understood the relationship between program speed and CPU usage, but wouldn't that just suggest inefficient rather than slow? Or rather, it might be fast and only slow down on a processor that didn't give it enough resources?

Date: 2008-12-13 05:09 pm (UTC)
From: [identity profile] robhu.livejournal.com
Did you discover the cause of your high CPU utilisation?

I find that Safari becomes sluggish over time. On those occasions closing Gmail (or my own internal apps page which has enormous amounts of naievely written JS) freezes Safari for some time. I imagine this is because both apps are leaking references or something, and when I close the tab they all get collected.

March 2026

S M T W T F S
1 2 3 4 56 7
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 8th, 2026 02:50 am
Powered by Dreamwidth Studios