Closed Bug 1749590 Opened 4 years ago Closed 4 years ago

Setting the value and defaultValue of a range input is a lot slower in Firefox than Chrome/Safari

Categories

(Core :: DOM: Forms, defect)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: jrmuizel, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The requestAnimationFrame callback on the attached test case takes about 400+ ms in Firefox vs ~10ms in Chrome. All of the time in Firefox is being spent in ICU.

Attached file test.html

This extra work is showing up noticeably in profiles when sliding the volume slider on twitch (see bug 1749365)

Blocks: 1749365

Here's a profile of Firefox: https://share.firefox.dev/3zN8q4r

There's no reason the value of <input type=range> should use ICU. <input type=number> needs to accept possibly-localized user input, but that's not true of range. I can fix when I'm back from PTO if there's nobody who can take it earlier.

Flags: needinfo?(emilio)

It should never need to deal with a localized value, unlike
<input type=number>.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Actually it's even more trivial than I thought.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7384180a6da7 Don't do localization shenanigans for <input type=range>. r=edgar
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch

I confirmed that this is dramatically better.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: