Closed Bug 1642394 Opened 2 years ago Closed 2 years ago

Investigation: Review existing callers into the search service

Categories

(Firefox :: Search, task, P3)

task
Points:
3

Tracking

()

RESOLVED FIXED
Firefox 79
Iteration:
79.2 - June 15 - June 28
Tracking Status
firefox79 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

We should investigate the existing callers into the search service for:

  • Are they using the most efficient calls?
  • Do we need to provide more/less APIs?

There have been some that I've already fixed that were doing things inefficiently, and hence, I think it would be worth checking the others. There is not loads of call points, so hopefully this won't take too much to do.

This will also help advise the post modernisation clean-up to ensure we know what the current functionality is/should be.

If there's a couple of simple changes, we could do them in this bug, otherwise we should split them out to new bugs.

Assignee: nobody → standard8
Status: NEW → ASSIGNED
Iteration: --- → 79.2 - June 15 - June 28

I took a look at the code and in general we're actually in pretty good shape. A few notes:

  • There's a couple of cases in C++ code (nsDocShell.cpp, ContentParent.cpp) which are already covered for future investigation by bug 1643008.
  • There's a few places we access the internal aliases directly. Given that there's work likely to happen on that soon, I'm not going to do anything further here.
  • It would be nice at some stage to rename getDefaultEngines to getAppProvidedEngines, I filed bug 1646128 for this.

Apart from those, there's a couple of places where we can tidy up SearchSuggestionController, and avoid a redundant check in telemetry. I'm going to attach those patches here as that seems easiest.

Depends on: 1646126

We removed MOZ_TOOLKIT_SEARCH ifdef in bug 1518551, so the search service is always present now.

Depends on D79876

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c372f5e541a5
Use SearchUtils in SearchSuggestionController. r=daleharvey
https://hg.mozilla.org/integration/autoland/rev/0edef712f5f3
Remove redundant check for search service from TelemetryEnvironment. r=chutten
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
You need to log in before you can comment on or make changes to this bug.