raddebugger icon indicating copy to clipboard operation
raddebugger copied to clipboard

[Performance] write all traps into memory

Open mistymntncop opened this issue 11 months ago • 2 comments

When debugging a release build of Firefox I have noticed a significant slowdown of launching Firefox when adding a small number of breakpoints. Without any breakpoints enabled Firefox launches within ~3 seconds. However with only around 5 breakpoints enabled it now takes ~9 seconds to launch, quite noticeable. This seems related to "write all traps into memory" - in particular the writing part. Firefox is a multi-process application ("Debug Subprocesses" was enabled) so there are many debug events being created during Firefox startup from dlls being loaded and threads being created, etc. I'm not sure what can be done to improve performance without changing the current trap design though ?

mistymntncop avatar Dec 30 '24 09:12 mistymntncop

This may not be because of the traps specifically, but may instead be due to the serial-dependence of DLL loading in the presence of breakpoints. When any breakpoints are set, DLL & PDB/RDI loading is required to be serially-dependent, because each new module can potentially imply new traps that need to be written, given a high-level breakpoint location.

This 9 seconds may be largely due to serially dependent debug info conversion. Can you confirm this by trying several runs with breakpoints after debug info conversion has already been done, and seeing if the timing is any different?

ryanfleury avatar Jan 07 '25 18:01 ryanfleury

Yes, I have confirmed this problem still exists even after all the PDB's have been converted to RDI's.

mistymntncop avatar Jan 07 '25 22:01 mistymntncop