Closed Bug 1592323 Opened 6 years ago Closed 1 month ago

Consider if SearchService._engines needs a better indexing mechanism, combine with __sortedEngines?

Categories

(Firefox :: Search, task, P3)

task
Points:
8

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: standard8, Unassigned)

References

Details

(Whiteboard: [sng][search-tech-debt])

In bug 1577733 I am adding a lookup into this._engines based on the extension id and the locale (_getEngineByWebExtensionDetails).

We might want to consider changing this._engines to have a different indexing method other than the name.

This will be easier to reason about once we've removed the legacy configuration after modernisation ships.

In addition to the above, we should look at this.__sortedEngines as well - they're basically storing exactly the same thing, but one is sorted and one is not.

Summary: Consider if SearchService._engines needs a better indexing mechanism → Consider if SearchService._engines needs a better indexing mechanism, combine with __sortedEngines?
Severity: normal → N/A
Points: --- → 8
No longer blocks: post-search-config-v2
Whiteboard: [sng][search-tech-debt]

This is no longer relevant, we since changed this._engines to be indexed by the search engine identifier as a Map, and generally encouraging users to use getEngineById where possible.

The __sortedEngines are now #sortedEngines, but the consumers are all generally expecting to loop over the list of engines anyway, so there's nothing really to do there.

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.