The Suggest Rust backend queries all Rust providers regardless of which suggestion types are enabled
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(1 file)
The Rust backend queries the Rust component here: https://searchfox.org/mozilla-central/rev/b1a029fadaaabb333d8139f9ec3924a20c0c941f/browser/components/urlbar/private/SuggestBackendRust.sys.mjs#102-115
The Rust component takes a list of providers to query, and the backend ends up passing in all possible providers because lazy.QuickSuggest.registeredRustSuggestionTypes
contains all possible providers. When I wrote this, I must have been thinking that registeredRustSuggestionTypes
contains only registered and enabled types.
So to fix, we need to check whether the corresponding feature is enabled, plus -- since features can manage more than one type of Rust suggestion -- whether the specific suggestion type is enabled.
Assignee | ||
Comment 1•5 months ago
|
||
Should add: This doesn't have any user-visible effect because we end up filtering out disabled suggestion types elsewhere. For example, sponsored and Wikipedia (non-sponsored) are filtered out here, Pocket is filtered out here, addon suggestions are filtered out here. So it's not a huge problem but we are potentially querying the Rust database unnecessarily.
Assignee | ||
Comment 2•5 months ago
|
||
Please see the bug for context.
Updated•5 months ago
|
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/97816b4e05e8 Don't query the Suggest Rust component for disabled suggestion types. r=daisuke
Comment 4•5 months ago
|
||
bugherder |
Description
•