Closed
Bug 897074
Opened 10 years ago
Closed 9 years ago
getAutoCompleteResults sometimes issues extremely long SQL queries
Categories
(Toolkit :: Form Manager, defect)
Toolkit
Form Manager
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: vladan, Assigned: MattN)
Details
(Keywords: main-thread-io, perf)
Attachments
(2 files)
1.19 MB,
text/plain
|
Details | |
6.52 KB,
patch
|
Dolske
:
review+
|
Details | Diff | Splinter Review |
The frecency calculation query in FormHistory.jsm can sometimes be over 1 million characters long! This is bad for performance and also bloats Telemetry pings (bug 896737).
Assignee | ||
Comment 1•10 years ago
|
||
We can probably bail from both loops over search tokens once we're over some threshold: for (let i = 0; i < searchTokens.length; i++) { I suspect these are mostly caused by users pasting long text into single-line text fields.
Assignee | ||
Comment 2•9 years ago
|
||
This should reduce the telemetry spam and probably help performance for long texts (maybe accidental pastes) while still preserving the accuracy when we re-use previous results.
Comment 3•9 years ago
|
||
Comment on attachment 8344118 [details] [diff] [review] v.1 Cap to 30 tokens when querying the database Review of attachment 8344118 [details] [diff] [review]: ----------------------------------------------------------------- Suggestion: I'd tend to think a much lower value (5? or even 10?) would be plenty.
Attachment #8344118 -
Flags: review?(dolske) → review+
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Justin Dolske [:Dolske] from comment #3) > Comment on attachment 8344118 [details] [diff] [review] > v.1 Cap to 30 tokens when querying the database > > Suggestion: I'd tend to think a much lower value (5? or even 10?) would be > plenty. Sorry, I started changing this and then got distracted by other bugs and pushed this without lowering it. I pushed a follow-up to lower to 10. https://hg.mozilla.org/integration/fx-team/rev/c62c26e3c73f https://hg.mozilla.org/integration/fx-team/rev/1c7402403124
Flags: in-testsuite+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c62c26e3c73f https://hg.mozilla.org/mozilla-central/rev/1c7402403124
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•