When using Ionide, over a project with a lot of files like Fulma repo or an Elmish applications Ionide become really slow.
Sometimes, I need to restart Ionide every 5-10 minutes, to force it to clear it's memory and gain intellisense for a short period of time.
Mono JIT compiler version 5.8.0.108 (tarball Fri Jan 19 18:15:21 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
Microsoft (R) Build Engine version 15.4.0.0 ( Wed Nov 29 14:56:11 UTC 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
15.4.0.0
Because it's a behavior that depends on the ionide usage time (longer you use it and more likely you may to encounter this problem) I have not found a 100% reproducible solution. Hopefully, the following process can help understand the problem.
git clone [email protected]:MangelMaxime/Fulma.gitcd Fulma./build.sh BuildDocs // This is just to make sure everything is setup in the projectcode .Fulma/Elements/Button.fssrc/Fulma/Elements/Button.fs and try typing Button.button from now in general the intellisense feel kind of slow. Here if you don't wait for step 10, you still need to wait 45 sec before getting intellisense over Button.buttonWith this process, we kind of let the time to Ionide to catch up but when developing or doing refactoring in your code base, you end up with several step 6 without waiting for step 7-8. You just code and want at some point see if you made everything alright.
Here are the FSAC logs: logs.txt
I got the same behaviour on one of my project here with many files. (I don't know if the number of files is important here)
Thanks a lot for detailed description. I鈥檒l try to reproduce it and investigate. In a meanwhile- can you try using netcore FSAC runtime? In my personal experience it鈥檚 usually better in terms of performance on bigger projects
adding https://github.com/fsharp/FsAutoComplete/issues/264 as ref.
we need to add diagnostics to FSAC probably to measure these issue
@Krzysztof-Cieslak Sure, I will try the netcore version. And give feedback about it if relevant.
Maybe it's a little late, but for others who ran into this issue, I think I should post my workaround here. I find disabling auto-import feature solved my issue, it's much faster now.
In your vscode setting panel:
"FSharp.resolveNamespaces": false,
"FSharp.externalAutocomplete": false
I already had "FSharp.externalAutocomplete": false disabled because it's missing a lot with Fulma for example.
I didn't know about resolveNamespaces I will try it too.
I don't know if this is helpful, but I am also experiencing extreme slowness with Ionide with a large solution (14 F# projects and 10 C# projects). Both VS Code with Ionide as well as VS 2017 were incredibly slow, but Visual Studio sped up drastically once they introduced the project cache size option. I've always thought it was related to number of projects since that fixed the performance problems on the Visual Studio side of things...
This should be better in Ionide 4.0
Most helpful comment
This should be better in Ionide 4.0