Closed Bug 1872457 Opened 7 months ago Closed 6 months ago

Removing all options from a Select can be slow

Categories

(Core :: DOM: Forms, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: toe_head2001, Assigned: toe_head2001)

Details

Attachments

(1 file)

When a <select> has many thousands of options, removing them all can be quite slow.

For example, I have a <select> with 50,000 options. Calling replaceChildren() on it takes 1,908ms (as measured by the Firefox profiler).

Assignee: nobody → toe_head2001
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ace5f3cc2520
Improve performance of HTMLSelectElement::RemoveOptionsFromList r=emilio
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: