CrashReporter::WriteExtraFile does many small write calls on the main thread
Categories
(Toolkit :: Crash Reporting, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: florian, Assigned: gsvelto)
References
(Blocks 1 open bug)
Details
(Keywords: perf, Whiteboard: [fxperf:p3])
Attachments
(1 file)
See this profile: https://perfht.ml/38PsHqX (this is a subset of the massive startup profile from bug 1618129 comment 9)
In addition to CrashReporter::CreateMinidumpsAndPair being very slow (already filed in bug 1550754), in this profile we see CrashReporter::WriteExtraFile writing JSON file(s) to disk very inefficiently.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
The PlatformWriter
is ridiculously inefficient because it does no buffering at all. With JSON this ends up requiring a ton of syscalls. Adding a minimum of buffering is certainly possible though it needs to happen on the stack because it needs to work from within an exception handler and thus cannot allocate memory.
That being said I'm rewriting all that code in Rust (see meta bug 1588530) and it's all going to run out-of-process so it might not be worth the fuss unless it's important to fix it now.
Comment 2•4 years ago
|
||
Normally I'd make this a fxperf:p2, but since it looks like the underlying mechanism is being re-written, and this should address this, making this an fxperf:p3. If we scrub the p3 list and find this is still an issue down the line, we can revisit.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
This is a bug in the crash reporter, so I am moving this bug to the Crash Reporting component.
Assignee | ||
Comment 4•4 years ago
|
||
Since the fix is small and we're updating breakpad too there's no hurt in addressing this before the rewrite. Taking it.
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Pushed by gsvelto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/88126ed3e760 Add buffering to the PlatformWriter to reduce the number of syscalls required to write the .extra file r=KrisWright
Comment 7•4 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•