dape icon indicating copy to clipboard operation
dape copied to clipboard

discussion: would it be worth adding warnings for suboptimal configuration?

Open timcharper opened this issue 1 year ago • 5 comments

I personally noticed dape performed worse before changing GC and read-process-output-max, wondering if it'd make sense to add warnings if:

  • read-process-output-max is at the default (4096)
  • If gc-cons-threshold is at the default (800000).
  • If (json-available-p) returns non-true (--with-json flag during build, should be turned on for most distros).

I also think the default debug logging settings substantially slow down Emacs for dape and should probably be tuned. dape should probably emit a warning if logging is aggressive, that it will impact the performance of dape.

timcharper avatar Dec 30 '23 01:12 timcharper

Sounds like an good idea. Currently I am working on removing dapes own parsing with jsonrpc and then the logging will be from jsonrpcand not dape so let's revisit this when I am done with the change 👍

svaante avatar Dec 30 '23 21:12 svaante

ok, sounds like json-rpc probably remove the need for this, so I'll close for now.

timcharper avatar Dec 31 '23 22:12 timcharper

jsonrcp is now on master, but I don't believe that will come with any great performance improvements so I'll go ahead and reopen this issue

svaante avatar Jan 05 '24 11:01 svaante

I can contribute this

timcharper avatar Feb 02 '24 01:02 timcharper

I closed the dape-doctor PR since, with time, I'm not actually convinced this is the way to go. Code to help you optimize Emacs belongs in another package, not in a debug backend package.

Also, the benefits are not super clear with my rough, unscientific, terrible benchmarks. In light projects: no difference. In larger projects (where it takes 20-30s to reach the breakpoint), I saw maybe a 10-20% improvement. In light of that, probably warrants a mention in the docs. IDK if the README is the right place for it though, happy to stick it somewhere in the Wiki to be forgotten if you prefer.

timcharper avatar Feb 11 '24 21:02 timcharper