GeckoView re-sets some preferences unnecessarily
Categories
(GeckoView :: General, defect, P1)
Tracking
(firefox75 fixed)
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: mstange, Assigned: snorp)
Details
(Whiteboard: [geckoview:m76])
Attachments
(1 file)
Profile: https://perfht.ml/2VN7meO (2ms interval) https://perfht.ml/2ImRyrj (10ms interval)
In this profile of GeckoView startup, SafeBrowsing.readPrefs()
takes up ~170ms: First, it takes ~40ms during SafeBrowsing.init()
, and then ~130ms in response to various prefs being set.
We should find out whether it makes a difference to set these prefs before GeckoViewStartup calls SafeBrowsing.init()
. From a brief glance at the code, it looks like the 130ms are pure repetitive work that be eliminated entirely.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
•
|
||
This looks like Bug 1547717, which I started on a while back. Now that we have a perf-related reason to do this I think it should be a higher priority.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #1)
This looks like Bug 1547717, which I started on a while back. Now that we have a perf-related reason to do this I think it should be a higher priority.
Hi james,
So I guess all the work here will be done in GeckoView? Is there anything you think I can help on Safe Browsing side?
If no, I'll update the component.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #1)
This looks like Bug 1547717, which I started on a while back. Now that we have a perf-related reason to do this I think it should be a higher priority.
Whoops, I was wrong. This isn't related to the resetting of prefs, but rather just setting them in response to GeckoRuntimeSettings
changes. I believe this means Fenix is changing the safe browsing settings after startup, which seems unusual. Digging a bit more.
Assignee | ||
Comment 5•5 years ago
|
||
It appears that Fenix (or a-c) is setting a ton of runtime settings after startup and again on each new session. This is bad. We should fix that, but also GV could do a lot better by de-duping.
Assignee | ||
Comment 6•5 years ago
|
||
Fenix is definitely modifying a bunch of runtime settings outside of the builder both on startup and when a new page is opened. I see the following things being set on startup:
03-06 11:17:26.218 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"javascript.enabled":true}
03-06 11:17:26.220 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"browser.display.use_document_fonts":1}
03-06 11:17:26.221 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"font.size.systemFontScale":100}
03-06 11:17:26.222 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.annotate_channels":true}
03-06 11:17:26.246 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.annotate_channels.strict_list.enabled":true}
03-06 11:17:26.249 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.socialtracking.enabled":true}
03-06 11:17:26.259 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.trackingTable":"moztest-track-simple,ads-track-digest256,analytics-track-digest256,social-track-digest256"}
03-06 11:17:26.259 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.cryptomining.enabled":true}
03-06 11:17:26.266 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.cryptomining.blacklistTables":"base-cryptomining-track-digest256"}
03-06 11:17:26.272 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.fingerprinting.enabled":true}
03-06 11:17:26.278 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.fingerprinting.blacklistTables":"base-fingerprinting-track-digest256"}
03-06 11:17:26.285 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.socialtracking.block_cookies.enabled":true}
03-06 11:17:26.286 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.socialtracking.annotate.blacklistTables":"social-tracking-protection-facebook-digest256,social-tracking-protection-linkedin-digest256,social-tracking-protection-twitter-digest256"}
03-06 11:17:26.292 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"network.cookie.cookieBehavior":4}
03-06 11:17:26.293 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"browser.safebrowsing.malware.enabled":true}
03-06 11:17:26.293 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"browser.safebrowsing.phishing.enabled":true}
03-06 11:17:26.294 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"devtools.debugger.remote-enabled":false}
03-06 11:17:26.294 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"ui.systemUsesDarkTheme":0}
03-06 11:17:26.295 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"font.size.inflation.minTwips":120}
03-06 11:17:26.296 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"browser.ui.zoom.force-user-scalable":false}
And then the following settings are modified when a new tab is opened:
03-06 11:18:06.191 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.annotate_channels":true}
03-06 11:18:06.193 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.annotate_channels.strict_list.enabled":true}
03-06 11:18:06.194 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.socialtracking.enabled":true}
03-06 11:18:06.195 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.trackingTable":"moztest-track-simple,ads-track-digest256,analytics-track-digest256,social-track-digest256"}
03-06 11:18:06.201 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.cryptomining.enabled":true}
03-06 11:18:06.201 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.cryptomining.blacklistTables":"base-cryptomining-track-digest256"}
03-06 11:18:06.202 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.fingerprinting.enabled":true}
03-06 11:18:06.203 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.fingerprinting.blacklistTables":"base-fingerprinting-track-digest256"}
03-06 11:18:06.203 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.socialtracking.block_cookies.enabled":true}
03-06 11:18:06.204 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.socialtracking.annotate.blacklistTables":"social-tracking-protection-facebook-digest256,social-tracking-protection-linkedin-digest256,social-tracking-protection-twitter-digest256"}
03-06 11:18:06.205 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"network.cookie.cookieBehavior":4}
03-06 11:18:06.207 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.annotate_channels":true}
03-06 11:18:06.211 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.annotate_channels.strict_list.enabled":true}
03-06 11:18:06.212 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.socialtracking.enabled":true}
03-06 11:18:06.212 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.trackingTable":"moztest-track-simple,ads-track-digest256,analytics-track-digest256,social-track-digest256"}
03-06 11:18:06.216 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.cryptomining.enabled":true}
03-06 11:18:06.217 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.cryptomining.blacklistTables":"base-cryptomining-track-digest256"}
03-06 11:18:06.220 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.fingerprinting.enabled":true}
03-06 11:18:06.221 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.fingerprinting.blacklistTables":"base-fingerprinting-track-digest256"}
03-06 11:18:06.222 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.socialtracking.block_cookies.enabled":true}
03-06 11:18:06.223 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.socialtracking.annotate.blacklistTables":"social-tracking-protection-facebook-digest256,social-tracking-protection-linkedin-digest256,social-tracking-protection-twitter-digest256"}
03-06 11:18:06.224 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"network.cookie.cookieBehavior":4}
03-06 11:18:06.413 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.annotate_channels":true}
03-06 11:18:06.413 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.annotate_channels.strict_list.enabled":true}
03-06 11:18:06.414 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.socialtracking.enabled":true}
03-06 11:18:06.416 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.trackingTable":"moztest-track-simple,ads-track-digest256,analytics-track-digest256,social-track-digest256"}
03-06 11:18:06.417 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.cryptomining.enabled":true}
03-06 11:18:06.417 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.cryptomining.blacklistTables":"base-cryptomining-track-digest256"}
03-06 11:18:06.417 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.trackingprotection.fingerprinting.enabled":true}
03-06 11:18:06.420 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.fingerprinting.blacklistTables":"base-fingerprinting-track-digest256"}
03-06 11:18:06.421 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"privacy.socialtracking.block_cookies.enabled":true}
03-06 11:18:06.421 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"urlclassifier.features.socialtracking.annotate.blacklistTables":"social-tracking-protection-facebook-digest256,social-tracking-protection-linkedin-digest256,social-tracking-protection-twitter-digest256"}
03-06 11:18:06.422 8215 8243 D GeckoViewStartup: SNORP: SetDefaultPrefs {"network.cookie.cookieBehavior":4}
This is pretty bad, but GV can also de-dup a bunch of this too. I have a patch for that, and I'll also file a Fenix bug to stop doing this.
Assignee | ||
Comment 7•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
The de-dup patch here helps, but there's still a bunch of stuff being set. I filed an A-C bug about this here: https://github.com/mozilla-mobile/android-components/issues/6193
Comment 10•5 years ago
|
||
bugherder |
Reporter | ||
Comment 11•5 years ago
|
||
The fix that landed here made no difference to the time spent in SafeBrowsing, so I'm renaming this bug and filing a new bug to track #6193 for the SafeBrowsing issue.
Reporter | ||
Comment 12•5 years ago
|
||
I filed bug 1621340 on the original issue.
Description
•