Closed Bug 1725318 Opened 4 years ago Closed 4 years ago

NLP.levenshtein() takes time when pasting long url

Categories

(Firefox :: Address Bar, defect)

defect

Tracking

()

VERIFIED FIXED
93 Branch
Tracking Status
firefox93 --- verified

People

(Reporter: daisuke, Assigned: daisuke)

References

Details

Attachments

(2 files)

Attached file long-dataurl.txt

A performance issue is found while fixing bug 1724016.

STRs:

  1. Copy the content in the attachment to clipboard.
  2. Paste it on urlbar.

Actual:
It takes some seconds on my env (OSX10.14) at least.

I have investigated a little, and commented on bug 1724016 comment 1, it seems that NLP.levenshtein() that is called in UrlbarProviderInterventions.jsm takes time.

And also, if we paste long URL, it seems not displayed correctly.
Even though the caret is displayed, the URL is not.
See https://i.gyazo.com/43d2cbe891a1c6d9aa71877c13566dcd.mp4
Perhaps this issue may be better fixed in follow-up bug.

Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/261ed6cd7f06 Avoid calculation score if the query starts with string like protocol. r=adw
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Confirmed the issue with 93.0a1 (2021-08-11) on Win 10, about 11 seconds until link displayed.

With 94.0a1 (2021-09-29), 93.0 the load times are on par with other browsers (~2-3 seconds) on Win10, Ubuntu16.
In regards to it, can view this as verified.

Removing qe+ flag based on comment 5. Thanks!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: