Closed
Bug 1360214
Opened 7 years ago
Closed 7 years ago
SanityTest.js is expensive during startup
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
Performance Impact | high |
People
(Reporter: florian, Assigned: milan)
References
(Blocks 1 open bug)
Details
See this profile https://perfht.ml/2qj0y5z where SanityTest.js costs us 144ms (out of 2.2s) during startup before the first browser window is shown. Can SanityTest.js avoid doing main thread I/O during startup? (the mozilla::Preferences::SavePrefFile call is expensive) Could some of this run on a different process?
Reporter | ||
Comment 1•7 years ago
|
||
The second savePrefFile call at http://searchfox.org/mozilla-central/rev/3dc6ceb42746ab40f1441e1e659ffb8f62ae78e3/toolkit/components/gfx/SanityTest.js#65 during reportResult costs us 132ms of UI jank in this profile: https://perfht.ml/2p1pMFw (and the first savePrefFile before the first window is shown costs us 128ms of startup time... but I believe that first flush is to ensure the information has reached the disk if we crash while testing gfx stuff. I can't see a justification for the second flush though).
Comment 2•7 years ago
|
||
Bug 1361262 has some discussion of SavePrefFile() as well.
See Also: → 1361262
Updated•7 years ago
|
Whiteboard: [qf] → [qf:p1]
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → milan
Assignee | ||
Comment 3•7 years ago
|
||
Florian, do you have time to build with patches attached to bug 789945 and re-run this test?
Flags: needinfo?(florian)
Reporter | ||
Comment 4•7 years ago
|
||
(In reply to Milan Sreckovic [:milan] from comment #3) > Florian, do you have time to build with patches attached to bug 789945 and > re-run this test? If you give me a try server build, I can profile it next week. I'm not going to try building on the reference hardware.
Flags: needinfo?(florian)
Assignee | ||
Comment 5•7 years ago
|
||
That would be amazing: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1b3f9b49921dff1a8eebfdb27e7e63bff28ccbc2
Comment 6•7 years ago
|
||
ni? to florian now that try build has been provided (comment 5).
Flags: needinfo?(florian)
Comment 7•7 years ago
|
||
Florian: ping?
Assignee | ||
Comment 8•7 years ago
|
||
Probably not worth profiling on that try build at this point, the code has changed enough. Let me do another build with up to date patches.
Assignee | ||
Comment 9•7 years ago
|
||
This build should be fine for testing: https://treeherder.mozilla.org/#/jobs?repo=try&revision=59aa8545e836cbd171fe830825a7d9b199d6c6cb A preference "preferences.allow.omt-write", true by default, can be set to false to force back the original behaviour. With the default true, we should have async/off main thread preference saves in majority of the cases.
Reporter | ||
Comment 10•7 years ago
|
||
Here is a profile of the first startup (so running SanityTest.js) of the try build from comment 9: https://perfht.ml/2qI7Osr Unfortunately without symbols the profile isn't very useful to look at non-JS code.
Flags: needinfo?(florian)
Assignee | ||
Comment 11•7 years ago
|
||
Patches that landed in bug 789945 should take care of this.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•