Closed Bug 1874072 Opened 5 months ago Closed 5 months ago

The Suggest Rust backend queries all Rust providers regardless of which suggestion types are enabled

Categories

(Firefox :: Address Bar, defect, P3)

defect

Tracking

()

RESOLVED FIXED
123 Branch
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.

Blocks: 1851255

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.

See Also: → 1874074
Attachment #9372140 - Attachment description: Bug 1874072 - Don't query the Suggest Rust component for suggestion types that are disabled. → Bug 1874072 - Don't query the Suggest Rust component for disabled suggestion types.
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
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: