Closed Bug 1819093 Opened 1 year ago Closed 1 year ago

Revise SearchService's OpenSearch mechanism to reduce unnecessary wake ups

Categories

(Firefox :: Search, defect, P3)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Currently the search service has a permanent timer that will trigger every 6 hours to check for updates to OpenSearch engines.

The vast majority of users do not have OpenSearch engines installed. Additionally, only a small percentage of OpenSearch defined engines have updates available. Hence most of the time this wake up is unnecessary.

We should:

Assignee: nobody → standard8
Status: NEW → ASSIGNED

This stops the timer being registered if there are no OpenSearch engines installed with updates.
This also reduces the timer checks to once per day, rather than every 6 hours.

The timer does not get removed, as it is considered that removing an OpenSearch engine is a rare option and so the timer can remain until shutdown.

Depends on D171325

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a44650eb4094
Rework test_opensearch_update.js to avoid having to manually set an update URL. r=mcheang
https://hg.mozilla.org/integration/autoland/rev/0ebcef1f64fc
Reduce unnecessary wake-ups caused by the SearchService's OpenSearch update mechanism. r=mcheang

Backed out for causing bustage due to toolkitsearch.manifest

[task 2023-03-07T10:15:43.069Z] 10:15:43     INFO -  package> /builds/worker/workspace/obj-build/_virtualenvs/build/bin/python /builds/worker/checkouts/gecko/toolkit/mozapps/installer/packager.py -DPKG_LOCALE_MANIFEST=/builds/worker/workspace/obj-build/browser/installer/locale-manifest.in -DMOZ_APP_NAME=firefox -DPREF_DIR=defaults/preferences[..] -DU_USING_ICU_NAMESPACE=0 -DWASM_HAS_HEAPREG=1 -DXP_DARWIN=1 -DXP_MACOSX=1 -DXP_UNIX=1 -DAB_CD=en-US \
[task 2023-03-07T10:15:43.069Z] 10:15:43     INFO -  package> 	--format omni \
[task 2023-03-07T10:15:43.069Z] 10:15:43     INFO -  package> 	--removals /builds/worker/checkouts/gecko/browser/installer/removed-files.in \
[task 2023-03-07T10:15:43.069Z] 10:15:43     INFO -  package> 	 \
[task 2023-03-07T10:15:43.069Z] 10:15:43     INFO -  package> 	 \
[task 2023-03-07T10:15:43.070Z] 10:15:43     INFO -  package> 	--minify \
[task 2023-03-07T10:15:43.070Z] 10:15:43     INFO -  package> 	 \
[task 2023-03-07T10:15:43.070Z] 10:15:43     INFO -  package> 	 \
[task 2023-03-07T10:15:43.070Z] 10:15:43     INFO -  package> 	--compress none \
[task 2023-03-07T10:15:43.070Z] 10:15:43     INFO -  package> 	/builds/worker/checkouts/gecko/browser/installer/package-manifest.in '../../dist' '../../dist'/firefox \
[task 2023-03-07T10:15:43.070Z] 10:15:43     INFO -  package>
[task 2023-03-07T10:15:43.071Z] 10:15:43     INFO -  package> error: $SRCDIR/browser/installer/package-manifest.in:174: Missing file(s): Firefox Nightly.app/Contents/Resources/components/toolkitsearch.manifest
[task 2023-03-07T10:15:43.071Z] 10:15:43    ERROR -  package> Traceback (most recent call last):
[task 2023-03-07T10:15:43.071Z] 10:15:43     INFO -  package>   File "/builds/worker/checkouts/gecko/toolkit/mozapps/installer/packager.py", line 295, in <module>
[task 2023-03-07T10:15:43.071Z] 10:15:43     INFO -  package>     main()
[task 2023-03-07T10:15:43.072Z] 10:15:43     INFO -  package>   File "/builds/worker/checkouts/gecko/toolkit/mozapps/installer/packager.py", line 252, in main
[task 2023-03-07T10:15:43.072Z] 10:15:43     INFO -  package>     copier.add(mozpath.join(respath, "removed-files"), removals)
[task 2023-03-07T10:15:43.072Z] 10:15:43     INFO -  package>   File "/usr/lib/python3.9/contextlib.py", line 124, in __exit__
[task 2023-03-07T10:15:43.072Z] 10:15:43     INFO -  package>     next(self.gen)
[task 2023-03-07T10:15:43.072Z] 10:15:43     INFO -  package>   File "/builds/worker/checkouts/gecko/python/mozbuild/mozpack/errors.py", line 143, in accumulate
[task 2023-03-07T10:15:43.073Z] 10:15:43     INFO -  package>     raise AccumulatedErrors()
[task 2023-03-07T10:15:43.073Z] 10:15:43     INFO -  package> mozpack.errors.AccumulatedErrors
[task 2023-03-07T10:15:43.073Z] 10:15:43    ERROR -  package> gmake[5]: *** [/builds/worker/checkouts/gecko/toolkit/mozapps/installer/packager.mk:25: stage-package] Error 1
Flags: needinfo?(standard8)
Flags: needinfo?(standard8)

Seems this line "@RESPATH@/components/toolkitsearch.manifest" should be removed from browser/installer/package-manifest.in.

Seems also for comm-central the equivalent change needs to be made to:

mail/installer/package-manifest.in and
suite/installer/package-manifest.in.

Flags: needinfo?(standard8)
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2022340dc6d
Rework test_opensearch_update.js to avoid having to manually set an update URL. r=mcheang
https://hg.mozilla.org/integration/autoland/rev/f0fa441a142a
Reduce unnecessary wake-ups caused by the SearchService's OpenSearch update mechanism. r=mcheang
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/38e9ec58f515
Adjust Thunderbird for bug 1819093 - Revise SearchService's OpenSearch mechanism to reduce unnecessary wake ups. rs=me
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: