Closed Bug 1651667 Opened 3 months ago Closed 3 months ago

css/lexer.js stringToCodes could be faster

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(firefox80 fixed)

RESOLVED FIXED
Firefox 80
Tracking Status
firefox80 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

I saw the function show up in profiling (e.g. with the shaper tool changed 20 times, it took 40ms)
Changing it from using Array#map to a simple for-loop lower time spent in this function (for the same example, profiling now show 3ms)

When profiling, I can see the function being 10 times faster now.

See Also: → 1651627
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/262677293e20
Replace stringToCodes Array.map call by a simple loop. r=rcaliman.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80
You need to log in before you can comment on or make changes to this bug.