Closed Bug 240525 Opened 20 years ago Closed 17 years ago

Download manager hangs for up to 30 seconds on any UI interaction

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: justdave, Unassigned)

References

Details

Doing any of the following cause the Firefox to hang for up to 30 seconds:

1) Initiating a download
2) Clicking the "Cancel" link next to a download in progress.
3) Clicking the "Show" or "Remove" links next to a completed download.

Firefox 0.8 does *not* have this problem, but I can reproduce it in every
nightly I've downloaded in the last two months (including this morning's)

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040412
Firefox/0.8.0+
OK, terminology change since my last download...

the Show link is gone in this morning's nightly (I haven't downloaded one in
about a month), replaced by an Open link.  The Open link does not cause a 30
second hang, however, it doesn't appear to do anything else, either.  Everything
else I mentioned still causes a temporary hang (after which the task goes on as
planned).
Just to correct my prior error, Open works, as long as the file hasn't been
moved from where it downloaded to. ;)

Open also doesn't hang, it acts immediately.  The rest of the links
(remove/pause/cancel) still hang (beachball cursor) for about 30 seconds before
acting.
Odd. It works fine for me, 20040412 Firefox/0.8.0+, using OS X 10.2.8

Perhaps it's a Panther-specific bug? What version of OS X are you using?
Browser themes or extensions? Fresh profile? :)
Yeah, it's Panther.  10.3.3.  Profile was imported from Mozilla a few weeks
after the Migration stuff went in.  The only extension installed is the
UserAgent Switcher, but that was installed after I started noticing this problem.
OK, finally got some time to experiment with this, and I think I tracked it down.

Made a backup copy of my profile, then nuked it.  Upon startup, Firefox imported
my Mozilla profile again.  Problem still present.

Nuked Firefox profile again.  Moved Mozilla profile out of the way so it
wouldn't be able to find it.  Started Firefox, all my settings lost of course,
and the problem is gone.

Moved Mozilla profile back.  Nuked Firefox profile, restored the backup of the
original one, poked around inside it.  Nuked downloads.rdf, restarted Firefox. 
Problem gone.

I never used the download manager in Mozilla (just the standard progress
dialog), but apparently it was keeping track anyway, for the last however many
years I'd been using it.  Turns out the downloads.rdf file imported from my
Mozilla profile was 540K in size, with a total of 801 downloads listed in it.

My guess is that it's attempting to re-parse the entire downloads.rdf file every
time one of the above-mentioned "hang" actions happens, and it's taking that
long to parse it, or there's something corrupted in it.
And I think I'm going to opt for "taking that long to parse it".  Mozilla's XML
parser says it validates (though it takes an exceedingly long time to make the
tree and display it).  Also, I just looked on another computer where Download
Manager was disabled, it it had a 292K file with 447 downloads in it.  Enabling
the download manager there showed pauses of almost exactly half the duration of
the pauses on the original machine where there were 800ish.
Exactly the same problem for me... what made be suspicious was that the problem
disappeared if I didn't disabled the download manager. But according to the
solution posted, the problem will appear again as soon as my download list gets
big, won't it?
Sorry, slight typo in the last comment... I meant that problem disappeared if i
disabled the download manager. And I am using Firefox 0.9 release.
I had the same problem with Mozilla Suite 1.7.2:
Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.2) Gecko/20040803
on Win2000sp4.
Should be
Product: Browser
Hardware: All
OS: All
?
Or I must open a new bug?

My "downloads.rdf" file was about 600 KB and have logged all download from
Moz1.2 some month ago (about 800).
I keep Preferences, Download, Open a progress dialog only, but mozilla insert
the log in download manager in any case.
If I remove a entry in the log of download manager it took about 1 minutues to
end. So it is impossible to clean the log entry by entry.
When I remove the file and restart a new download, Moz recreate an empty file
and the bug gone.
My idea is that parsing/sorting/inserting algoritm is really too slow in this file.
Implement a solution with size check and delete log older than...
*** Bug 269454 has been marked as a duplicate of this bug. ***
-> All/All, per Win2K dup.
OS: MacOS X → All
Hardware: Macintosh → All
(In reply to comment #5)
> Moved Mozilla profile back.  Nuked Firefox profile, restored the backup of the
> original one, poked around inside it.  Nuked downloads.rdf, restarted Firefox. 
> Problem gone.
(In reply to comment #9)
> I had the same problem with Mozilla Suite 1.7.2:
> My "downloads.rdf" file was about 600 KB and have logged all download from
> Moz1.2 some month ago (about 800).
>...
> When I remove the file and restart a new download, Moz recreate an empty file
> and the bug gone.

Both see Bug 159107. Duplicate?

for FF use this to prevent a quick size growing: bug 132755 comment 106
or for all: write-protect the file downloads.rdf (disadvantage: no dl. history)
*** Bug 295989 has been marked as a duplicate of this bug. ***
*** Bug 293430 has been marked as a duplicate of this bug. ***
*** Bug 322439 has been marked as a duplicate of this bug. ***
*** Bug 322709 has been marked as a duplicate of this bug. ***
FF1.5 began to take 20 to 30 seconds per download and my download history was not that large.  Sorry, dont have an exact number, but it was probably a couple hundred at most.  Will report an exact number next time the delay gets unbearable again.  (This became so annoying that I started copying URLs into IE to do my downloads.)  Cleared up when I deleted the download history.

But my question is, why is this not reported in the Known Issues of the Release Notes???  If as some comments suggest, this happens even if the download manager is disabled, this should be happening to a large portion of FF users.....

Also, the workaround causes me to lose some functionality, i.e. lose my download history. To me, this is a somewhat major function.  (Beside being one that distinguishes FF from IE.)  So it seems like more than just a "normal" severity problem, and I would like to suggest raising the severity to major.

Bug #304251 is probably another dup of this one.
OK, I find that after about 80 downloads, the delay starts to become noticeable. Perhaps 2 to 4 seconds.  After about 100, the delay is 4 to 5 seconds, and is annoying now, so Im not willing to let it get to 20 or 30 seconds again.  Im on a Windows XP on a 2.4GHz Pentium 4 with 512MB.  Some other apps running, but except for this FF is performing just fine.  There is definitely a problem here.
*** Bug 261885 has been marked as a duplicate of this bug. ***
I'm still using v. 1.0.7, but on creating a new downloads folder and pointing the downloads folder field in Options to it, has no effect on the delay.  I thik I am also seeing a lot of CPU activity at that time as shown by ActiveCPU %usage monitor.

I had a dup (322439) where it says noone is working on this, so I assume it is the same in the current version.  I am using XP SP2 on an Athlon Palomino XP 1700+ (1.47 GHz) on a dial-up connection, connect=52K.  sg

In comment https://bugzilla.mozilla.org/show_bug.cgi?id=240525#c12 in this bug, it lists bug https://bugzilla.mozilla.org/show_bug.cgi?id=132755#c106 referring to a file in the ff profile "downloads.rdf" which is a list of downloads that ff keeps and structures after a download is requested and before it begins.  This is where the delay problem is and a lot of people seem to be working on an interface in Options to automatically remove records of downloads in "downloads.rdf".
QA Contact: ali → download.manager
This is still very noticeable in Firefox 2.0.0.1 on OSX. Anytime I'd do a download, things would be frozen for about 30 seconds, even if I was saving a small picture that was just a couple kilobytes. I ended up just using wget to download most of the things I wanted. Same exact profile used in the linux build of 2.0.0.1 doesn't seem to be as bad though.

I'm using G4 1.42ghz Mac mini with 512mb of RAM on OSX 10.4.8 and a Athlon64 2800+ with 1024mb of RAM on Debian Sid.
Try disabling download history (under Privacy).  Firefox has horrible performance with regards to managing the download history.  There is a bug to fix this, but I can't remember what the bug number is.

Meanwhile, if you want to maintain a reasonable download history length, You could use the Download Statusbar extension and configure it to trim the history at 20 items or less.  I have mine set to 10.
fyi bad downloads.rdf may appear empty but be over 1meg.
it can also cause total freeze for many minutes on file open dialog.
Bugs filed for Mozilla Suite; ffox dupes have been going there.

https://bugzilla.mozilla.org/show_bug.cgi?id=337538
https://bugzilla.mozilla.org/show_bug.cgi?id=161783
https://bugzilla.mozilla.org/show_bug.cgi?id=159107
Assignee: bugs → nobody
Issue should have been fixed by Bug 380250.
Status: NEW → RESOLVED
Closed: 17 years ago
Depends on: 380250
Resolution: --- → FIXED
Product: Firefox → Toolkit
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.