Ticket #286 (assigned defect)

Opened 1 year ago

Last modified 1 year ago

DownThemAll 1.0b1 cpu usage is very high

Reported by: enola Assigned to: MaierMan (accepted)
Priority: major Milestone:
Component: Infrastructure Version: 1.0b1
Keywords: Cc:
Operating System: All

Description

I have a six megabit connection and a 1,2 Ghz Centrino Laptop running Ubuntu 7.04. If I download only one file with only one chunk Firefox uses always at least 50 - 60% cpu and with two downloads with one chunk 80 - 90%. I think this is too much and it prevents cpu from scaling down so laptop makes much more noises. Wget btw. uses only around 1%. I know that a GUI needs more but I have disabled the great new tooltip so the difference shouldn't be so great. This is not only a problem of 1.0 beta since the old version has a similar problem but I think cpu usage has increased.

Btw. except of the high cpu usage DownThemAll is a great download manager and since 1.0b it works without problems under Linux and it is the only download manager for Linux I have found which could manage file name changes after download start (filenames different from url).

Change History

2007-07-26 22:15:46 changed by MaierMan

  • status changed from new to assigned.

There seem to be issues indeed.
Checked in some code yesterday that seems to improve the situation a bit, but in general it seems that most of the time spent is in iowait.
I don't know exactly why this happens, but I can similar (but a little less severe) behavior from all mozilla IO-operations incl. the built-in FX download manager.
I suspect mozilla's somewhat complex NSPR (portable runtime) implementation that also coordinates threads/locks is the cause.

The same code runs quite well on other platforms such as WinXP (idles max. 5% for a localhost download with up to 12MB/s).

Would you please check the next NightlyBuild (available after 02:00 CET) and check if you can see slight improvements as well?

2007-07-27 16:04:37 changed by enola

DownThemAll nightly uses only 10-30% cpu with one download which prevents cpu from running with 1,2 GHZ all the time. Many thanks.

2007-07-27 18:04:36 changed by MaierMan

What does top say? Is it mostly wait?

2007-07-28 17:04:02 changed by enola

PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15 0 140m 40m 19m S 15.0 2.7 0:13.62 firefox-bin

2007-07-28 17:09:38 changed by enola

According to System Monitor Firefox is sleeping most of the time. It sometimes changes to running for some seconds and then back again but it always consumes 10-20% cpu.

2007-08-02 13:12:35 changed by enola

I have made some tests. If I download a file in Firefox directly it consumes around ~5% all the time but 10% max. If I download the same file with DownThemAll nightly and only one chunk it is always above 10% (mostly around 15% but sometimes even over 20%). Of course it is much more better than before and CPU doesn't run the highest clock all the time but at least for battery usage some optimizations would be great, if possible :)

2007-08-07 23:21:32 changed by rohitgupta

I just want to concur that the cpu usage is very high. Not just the reported usage in the Task Manager, but actual usage. Even typing halts for a few seconds at a time.

2007-10-15 20:33:57 changed by enola

I has become much more worser. Now Firefox consumes nearly 80% and more cpu with two downloads รก two chunks. This doesn't happen with the beta 2 (20-30%) but with the nightly builds.