File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/electron/src/domain/rum Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,14 @@ export function startCrashMonitoring(onRumEventObservable: Observable<CollectedR
168168 uploadToServer : false , // We'll handle uploading via RUM
169169 } )
170170
171- // Wait for app to be ready before accessing crash dumps directory
171+ // https://www.electronjs.org/docs/latest/tutorial/performance#2-loading-and-running-code-too-soon
172+ // As crashes files accesses and parsing can be I/O and CPU intensive, delay them to not impact the main thread during startup
173+ // Crashes at startup have been observed on windows VM without the setTimeout
174+ // TODO:
175+ // - process files sequentially instead of in parallel to limit impact on resources
176+ // - stress test to see if it should be adapted
177+ // - consider offloading that to a different thread
172178 void app . whenReady ( ) . then ( ( ) =>
173- // wait a bit more to prevent crash on windows ¯\_(ツ)_/¯
174179 setTimeout ( ( ) => {
175180 processCrashesFiles ( onRumEventObservable , applicationId ) . catch ( monitorError )
176181 } , ONE_SECOND )
You can’t perform that action at this time.
0 commit comments