www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Visual D and VS2022 : memory leak?

reply Fausto <fausap outlook.it> writes:
Hello all,
I have a huge memory usage when I use visual D (in VS 2200) and 
this of course is slowing down everything.
DMD Semantic Server uses up to 25-29 GB of RAM and even if Visual 
Studio is closed, two DMD processes are still running in the 
background.

How is it possible?

I am using the latest Visual D version and I didn't notice that 
the parameter to restart DMD server if it is using more than X MB 
of memory. The default setting is 0 (so never) and I think this 
is the main reason for this behaviour.

But anyway, is it possible to use almost 30GB of memory?

thanks,
Fausto
Oct 04 2022
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 04/10/2022 23:26, Fausto wrote:
 Hello all,
 I have a huge memory usage when I use visual D (in VS 2200) and this of 
 course is slowing down everything.
 DMD Semantic Server uses up to 25-29 GB of RAM and even if Visual Studio 
 is closed, two DMD processes are still running in the background.
 
 How is it possible?
Just the other day I noticed that the updated dmd compiler version that powers dmdserver introduced some global arrays to keep documentation out of the syntax tree. These reference the source file content, so they never get garbage collected and can cause rather fast increase of memory usage. I have a fix for that. There are a few other issues I want to resolve, but I hope to have a new release this weekend.
 
 I am using the latest Visual D version and I didn't notice that the 
 parameter to restart DMD server if it is using more than X MB of memory. 
 The default setting is 0 (so never) and I think this is the main reason 
 for this behaviour.
Unfortunately, this option is unlikely to help, as it doesn't kill the process, but frees all modules kept in memory. This won't affect the global arrays mentioned above.
 
 But anyway, is it possible to use almost 30GB of memory?
 
 thanks,
 Fausto
Oct 05 2022
parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Wednesday, 5 October 2022 at 19:30:29 UTC, Rainer Schuetze 
wrote:
 On 04/10/2022 23:26, Fausto wrote:
 [...]
Just the other day I noticed that the updated dmd compiler version that powers dmdserver introduced some global arrays to keep documentation out of the syntax tree. These reference the source file content, so they never get garbage collected and can cause rather fast increase of memory usage. I have a fix for that. There are a few other issues I want to resolve, but I hope to have a new release this weekend.
 [...]
Unfortunately, this option is unlikely to help, as it doesn't kill the process, but frees all modules kept in memory. This won't affect the global arrays mentioned above.
 [...]
It would be wonderful if you had a fix for it 🙏
Oct 06 2022
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 06/10/2022 16:47, Imperatorn wrote:
 On Wednesday, 5 October 2022 at 19:30:29 UTC, Rainer Schuetze wrote:
 On 04/10/2022 23:26, Fausto wrote:
 [...]
Just the other day I noticed that the updated dmd compiler version that powers dmdserver introduced some global arrays to keep documentation out of the syntax tree. These reference the source file content, so they never get garbage collected and can cause rather fast increase of memory usage. I have a fix for that. There are a few other issues I want to resolve, but I hope to have a new release this weekend.
 [...]
Unfortunately, this option is unlikely to help, as it doesn't kill the process, but frees all modules kept in memory. This won't affect the global arrays mentioned above.
 [...]
It would be wonderful if you had a fix for it 🙏
New version 1.3.1 of Visual D is available, please try it.
Oct 09 2022
parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 9 October 2022 at 15:47:21 UTC, Rainer Schuetze wrote:
 On 06/10/2022 16:47, Imperatorn wrote:
 On Wednesday, 5 October 2022 at 19:30:29 UTC, Rainer Schuetze 
 wrote:
 [...]
It would be wonderful if you had a fix for it 🙏
New version 1.3.1 of Visual D is available, please try it.
Wow! I will, thank you 🙏
Oct 09 2022