Thread overview
VisualD - Performance, Memory Usage, & Update Crash
Feb 10, 2020
Marcel
Feb 10, 2020
Rainer Schuetze
Feb 11, 2020
Rainer Schuetze
Feb 12, 2020
Marcel
Feb 15, 2020
Rainer Schuetze
February 10, 2020
Hello!
I've been using VisualD for about 3 months now and I've been facing several issues that are making it increasingly difficult to work on my projects.

1- I have a PC and a laptop. The former has Windows 10 installed and the latter has Windows 7: for some reason the "Check Now" button, for updating VisualD and the various compilers, causes Visual Studio to instantly crash with no error message, followed by a program restart. I've faced this issue only recently in my Windows 7 laptop.

2- DMD language server's memory usage can get quite high, causing all running applications to slow down dramatically. Additionally, once memory usage reaches 1~2GB it doesn't decrease, which makes me think its leaking memory.

3- Most operations that require semantic analysis are catastrophically slow. For example, say you want to find where a symbol is defined (the symbol is from the current solution): This operation can take around 2 MINUTES, and many times the search result is incorrect.

Are there any fixes for these issues?
February 10, 2020

On 10/02/2020 11:47, Marcel wrote:
> Hello!
> I've been using VisualD for about 3 months now and I've been facing
> several issues that are making it increasingly difficult to work on my
> projects.

Sorry to hear that.

> 
> 1- I have a PC and a laptop. The former has Windows 10 installed and the latter has Windows 7: for some reason the "Check Now" button, for updating VisualD and the various compilers, causes Visual Studio to instantly crash with no error message, followed by a program restart. I've faced this issue only recently in my Windows 7 laptop.

I haven't tried to run Visual D in Windows 7 in a while, maybe the update mechanism has a problem there. What version of VS are you using?

Are there crash dumps in %APPDATA%\Local\CrashDumps that can be analyzed?

> 
> 2- DMD language server's memory usage can get quite high, causing all running applications to slow down dramatically. Additionally, once memory usage reaches 1~2GB it doesn't decrease, which makes me think its leaking memory.

Are you using the "experimental DMD based parsing engine" that came with 0.51? This is known to leak memory (it is based on the dmd compiler frontend which is built for infinite memory, i.e. it makes it hard to collect unused memory). I'm gradually trying to fix these leaks.

The standard semantic engine is written in C#, so should not leak memory (to the extent of what its GC can do). In my experience it uses less memory than the compiler does.

> 
> 3- Most operations that require semantic analysis are catastrophically slow. For example, say you want to find where a symbol is defined (the symbol is from the current solution): This operation can take around 2 MINUTES, and many times the search result is incorrect.

This makes me suspect that you are using the standard "legacy" engine, though I don't remember waiting minutes for completions (which is usually the longest operation - especially if UFCS and mixin expansions are enabled).

The dmd based semantic engine is much faster, but unfortunately code completion isn't yet very usable. Symbol lookup is pretty good, but might need some extra work for templates as these might not be analyzed by the compiler.

> 
> Are there any fixes for these issues?

More specific bug reports can help to pinpoint the actual problems. You can report them at https://issues.dlang.org/ for component visuald.
February 11, 2020

On 10/02/2020 19:54, Rainer Schuetze wrote:
>> 1- I have a PC and a laptop. The former has Windows 10 installed and the latter has Windows 7: for some reason the "Check Now" button, for updating VisualD and the various compilers, causes Visual Studio to instantly crash with no error message, followed by a program restart. I've faced this issue only recently in my Windows 7 laptop.
>
> I haven't tried to run Visual D in Windows 7 in a while, maybe the update mechanism has a problem there. What version of VS are you using?
> 

I got hold of a Windows 7 VM and could reproduce the crash: it happens due to unexpected problems with https-requests. The dmd download is still using http and works for me.

I can avoid the crashes (showing an error in the status bar instead), but I haven't found a solution yet for WinHttp not allowing the secure connection.
February 12, 2020
On Tuesday, 11 February 2020 at 22:22:28 UTC, Rainer Schuetze wrote:
>
>
> On 10/02/2020 19:54, Rainer Schuetze wrote:
>>> 1- I have a PC and a laptop. The former has Windows 10 installed and the latter has Windows 7: for some reason the "Check Now" button, for updating VisualD and the various compilers, causes Visual Studio to instantly crash with no error message, followed by a program restart. I've faced this issue only recently in my Windows 7 laptop.
>>
>> I haven't tried to run Visual D in Windows 7 in a while, maybe the update mechanism has a problem there. What version of VS are you using?
>> 
>
> I got hold of a Windows 7 VM and could reproduce the crash: it happens due to unexpected problems with https-requests. The dmd download is still using http and works for me.
>
> I can avoid the crashes (showing an error in the status bar instead), but I haven't found a solution yet for WinHttp not allowing the secure connection.

Hello!
Yesterday I reinstalled VisualD and performance greatly improved, I suspect I had enabled both the UFCS and mixin sematic analysis options. I'm also glad you found the reason for the crash in Windows 7.
By the way, can I contribute to VisualD in some way?
February 15, 2020

On 12/02/2020 21:52, Marcel wrote:
> On Tuesday, 11 February 2020 at 22:22:28 UTC, Rainer Schuetze wrote:
>>
>>
>> On 10/02/2020 19:54, Rainer Schuetze wrote:
>>>> 1- I have a PC and a laptop. The former has Windows 10 installed and the latter has Windows 7: for some reason the "Check Now" button, for updating VisualD and the various compilers, causes Visual Studio to instantly crash with no error message, followed by a program restart. I've faced this issue only recently in my Windows 7 laptop.
>>>
>>> I haven't tried to run Visual D in Windows 7 in a while, maybe the update mechanism has a problem there. What version of VS are you using?
>>>
>>
>> I got hold of a Windows 7 VM and could reproduce the crash: it happens due to unexpected problems with https-requests. The dmd download is still using http and works for me.
>>
>> I can avoid the crashes (showing an error in the status bar instead), but I haven't found a solution yet for WinHttp not allowing the secure connection.
> 
> Hello!
> Yesterday I reinstalled VisualD and performance greatly improved, I
> suspect I had enabled both the UFCS and mixin sematic analysis options.
> I'm also glad you found the reason for the crash in Windows 7.

Yeah, that UFCS part can be really slow. That should not be an isssue with the DMD based engine.

> By the way, can I contribute to VisualD in some way?

The repository for the main component is here: https://github.com/dlang/visuald, but there are other components, too. See https://rainers.github.io/visuald/visuald/BuildFromSource.html

If you don't want to get your hands dirty on the code itself, reporting bugs at issues.dlang.org/ for component visuald or improving the documentation (see "Improve this page" links) is also welcome.