Open Bug 1623925 Opened 5 years ago Updated 3 years ago

When remote debugging is enabled, remote debugging initialization slows down startup by 140ms on Moto G5

Categories

(DevTools :: about:debugging, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Profile: https://perfht.ml/2UpoG7b

If remote debugging is enabled, we spend 140ms on startup in onEnable in GeckoViewRemoteDebugger.jsm.
This is not a default configuration, so it's not overly concerning, but it would be very nice to speed this up.

At the moment, when profiling startup, I always need to turn off remote debugging, quit the app, launch it with startup profiling, re-enable remote debugging, and grab a profile. This is the only way to get realistic profiles without the devtools code, and it's a bit cumbersome.

For reference, here are the first 3.5 seconds of startup with and without remote debugging enabled.
Without remote debugging: https://perfht.ml/397wH6n
With remote debugging: https://perfht.ml/3a84PQM

Julian, any idea on what could be done here? Could remote debugging initialize more lazily to get it off the critical path?

Flags: needinfo?(jdescottes)

Keeping the ni? but looking at the code, it feels like we could separate initializing the DevToolsServer and listening for connections (via SocketListener). I'm not super familiar with this part of the codebase, but it seems doable.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → about:debugging

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

Not looking at this for now.

Flags: needinfo?(jdescottes)
You need to log in before you can comment on or make changes to this bug.