see if we can avoid initializing nsiCertStorage on the main thread (or open the backing db off the main thread)
Categories
(Core :: Security: PSM, enhancement, P1)
Tracking
()
People
(Reporter: keeler, Assigned: keeler)
References
Details
(Keywords: perf:responsiveness, Whiteboard: [psm-assigned])
Attachments
(2 files)
(In reply to Florian Quèze [:florian] from bug 1429796 comment #18)
(In reply to Dana Keeler (she/her) (use needinfo) (:keeler for reviews) from comment #15)
Looks like we need to whitelist the DB file backing cert_storage.
It looks like the <profile>/security_state/data.mdb file is being accessed from the main thread. Is this intentional? If so, what makes the I/O to this file impossible to do off main thread?
Assignee | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
This is visible in profiles: http://bit.ly/2V3H6te
In this case, it's a startup profile, and is showing up right after first paint, when we do a nsIOService::SpeculativeConnect call. It's unfortunate that this speculativeConnect perf optimization causes us to fsync on the main thread.
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
After initialization (which happens on the main thread because we need to access
preferences), cert_storage will first be used on a certificate verification
thread. We can use this to avoid main-thread I/O by lazily opening the DB when
it first gets used rather than at initialization.
Comment 4•6 years ago
|
||
Thanks for working on this, Dana! Does this mean that we can remove this xperf whitelist entry?: https://searchfox.org/mozilla-central/rev/3d469329a42644b41e66944d8da22d78d8c0f5ec/testing/talos/talos/xtalos/xperf_whitelist.json#527-532
Assignee | ||
Comment 5•6 years ago
|
||
Ah - thanks for the reminder. Presumably so - I'm trying now with https://treeherder.mozilla.org/#/jobs?repo=try&revision=09bf7f7ea07e9d8e2e8607f490fa321f119e3d36
Comment 6•6 years ago
|
||
bugherder |
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Seems we can remove that entry: https://treeherder.mozilla.org/#/jobs?repo=try&revision=09bf7f7ea07e9d8e2e8607f490fa321f119e3d36
Comment 10•6 years ago
|
||
Setting 67=wontfix because I assume we don't need to uplift this fix to 67 Beta.
Comment 11•6 years ago
|
||
bugherder |
Comment 12•6 years ago
|
||
== Change summary for alert #20155 (as of Thu, 28 Mar 2019 00:26:15 GMT) ==
Improvements:
5% Heap Unclassified osx-10-10-shippable opt stylo 79,391,981.91 -> 75,423,169.70
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=20155
Updated•3 years ago
|
Description
•