Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
208 stars 50 forks source link

100% CPU usage if DCD crashes regularly #343

Open WebFreak001 opened 1 year ago

WebFreak001 commented 1 year ago

from user report, presumably dcd-server crashes on startup or shortly after.

serve-d should recognize this and in the case of repeated failure, print a warning to the user prompting to continue only after a button press.

dector commented 1 week ago

Hi. I've decided to try D and having very unpleasant experience from the start. 😅

I'm using VSCode with installed webfreak.code-d v0.23.2 extension. It's downloading serve-d automatically but when serve-d in running - it's consuming too much memory and loading CPU extensively.

image

I have just basic hello-world file. If I'm not typing anything - CPU usage goes down after 4-5 seconds. But if I format the file - I see 100%+ CPU load again.

If I'm trying to call autocomplete - memory usage skyrocketing to 30G RAM + 12G swap and it's crashing my GNOME DE. 😄

How can I help to profile it to detect a bug? Thanks!