Closed Bug 211632 Opened 21 years ago Closed 20 years ago

Deleting/Clearing downloads is extremely slow

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: djst, Assigned: bugs)

References

Details

(Keywords: perf)

Attachments

(2 files)

If you have lots of downloads in the Download Sidebar history, deleting items
can take very long. 

Steps to reprocude:
1. Make sure you have many (50+) finished downloads.
2. Select all downloads by selecting the first one and then hold Shift while
clicking on the last one.
3. Right-click and select Remove

Actual Results:
Complete lockup of browser process for several seconds.

Expected Results:
Instant removal and repainting of list.

This is probably a multiple repainting issue (the list is repainted every time
each individual delete occurs).
I need a very large downloads.rdf to test with.
Attached file 50 entry download.rdf
Large download.rdf, per request.
Attached file 100 entry download.rdf
This is a larger download.rdf for testing. I will note that on a 1.3 GHz Athlon
with 512MB of RAM that there was a slight (~.5 second) delay opening the
download file picker on downloads >85. I did not notice any delay when clearing
the entire list (didn't try individual entries)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030726 Mozilla
Firebird/0.6.1
Karl, please try the original steps to reprocude and see if how slow performance
you get then.
QA Contact: asa
Tested using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a)
Gecko/20030926 Firebird/0.7+

yes, its not the quickest process.  Even highlighting 100 files in a folder and
deleting them behaves in the same manner, and about the same speed.  It could be
tweaked to be faster, though, but I don't know how much that's possible with
RDF+Javascript+xpconnect.
QA Contact: mpconnor
is this still valid?  can anyone retest with the current download manager?
Definitely still valid using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.6b) Gecko/20031210 Firebird/0.7+
I haven't looked at the source, but I would guess that the current code removes
list items one by one, regardless of how many items are selected (and regardless
if you're pressing the Clean Up button).

A quicker way would be to simply clear the list and rebuild it using whatever is
left of the download data (e.g. nothing if you pressed the Clean Up button).
However, that solution would not be good if you're just deleting a few list
items, so it would have to be condidional, e.g.:

IF (number_of_selected_elements > 50) THEN
  list.clear()
  rebuild_list()
ELSE
  FOR (each selected element)
    list.element.remove()
ENDIF

Just a thought.
Assignee: blake → bugs
Download Manager is extremely slow in all tasks :(
what'd different about bug 227220 Clean up in Download Manager is slow for many
records
*** Bug 227220 has been marked as a duplicate of this bug. ***
Is bug 236267 a dupe of this? I can't tell.
*** Bug 236267 has been marked as a duplicate of this bug. ***
*** Bug 258134 has been marked as a duplicate of this bug. ***
*** Bug 261240 has been marked as a duplicate of this bug. ***
->invalid

The Remove button has now been replaced with a Clean Up button that always
removes all finished/cancelled downloads.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: