phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Memory usage is through the roof with devsense (tested up to 1.54)

Open archon810 opened this issue 11 months ago • 2 comments

Hi,

I initially switched to devsense from intelephense due to memory issues with the latter, and at first it was behaving well, but now it's using up a lot of memory too, for a project that is of decent size, but isn't that large (Wordpress with 2 dozen plugins). What's weird is memory use was negligible at first in July 2024, but is now using 260+GB virtual memory and over 2.5GB resident memory on a 16GB RAM machine.

1.53: https://i.imgur.com/zU01Vx3.png

1.54: https://i.imgur.com/jNe6wp7.png

This is a remote ssh project, and I'd love to figure out what's causing this and help you fix it.

archon810 avatar Dec 17 '24 01:12 archon810

Checked a local project running in WSL and found for some reason a ton of devsense processes instead of just 2. How's this even possible?

image

archon810 avatar Dec 17 '24 01:12 archon810

@archon810

Thank you for reporting the issue, and for the details.

  • A 260G virtual mem is expected. It's not a bug, it's just a number, but I understand that it looks bad.

  • The list with multiple processes shows threads of a single process actually (you can switch to a tree view, and they will all be a part of a single process) - their RAM is shared so it's all the same memory being used by multiple threads. We can consider adding a setting to limit the number of threads so it won't use all of the CPU's cores.

  • 1056M RAM is a bit high. It may happen during initial indexing, but we'll double-check if there isn't a bug. Note, if you would have composer.json, we greatly optimize memory usage for the entire vendor directory (once it's indexed).

jakubmisek avatar Dec 17 '24 10:12 jakubmisek