Closed Bug 1726837 Opened 11 months ago Closed 10 months ago

Remove unnecessary loop over tokens in splitString() in UrlbarTokenizer.jsm

Categories

(Firefox :: Address Bar, task, P3)

task
Points:
2

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: adw, Assigned: daisuke)

References

Details

(Keywords: perf)

Attachments

(1 file)

This loop iterates over every token, but as currently written, all it does is special-case the first and last tokens and push every other token in between onto an array. There's no need for that. Instead it can use the tokens array as initialized and handle the first and last tokens as necessary, potentially replacing them with with two tokens each, the restriction token + remainder.

This is spun out from bug 1664814 and Daisuke's investigation in D123043.

Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Pushed by dakatsuka.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f79cc68cd2fe
Refactoring for splitString function. r=adw
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.