Ionide-vscode-fsharp: Ionide really slow/unresponsive on some projects

Created on 8 Feb 2018  路  8Comments  路  Source: ionide/ionide-vscode-fsharp

Description

When using Ionide, over a project with a lot of files like Fulma repo or an Elmish applications Ionide become really slow.

  • Intellisense can take from 10 sec, to never to show up
  • Errors displays can take up to 10 minutes to be refresh

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.

Machine infos

  • Operating system: Linux
  • Arch: x64
  • Runtime: .Net
  • Mono version:
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)

  • MSBuild version:
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

Reproduction

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.

  1. git clone [email protected]:MangelMaxime/Fulma.git
  2. cd Fulma
  3. ./build.sh BuildDocs // This is just to make sure everything is setup in the project
  4. code .
  5. Wait to get Ionide loaded. You can check that it's working by hovering a variable and wait for the popup to show.
  6. Remove this lines: https://github.com/MangelMaxime/Fulma/blob/master/src/Fulma/Elements/Button.fs#L145-L150
  7. Wait to see Ionide refresh it's error panel. I waited for 2min30 before going to step 8
  8. If this don't occur, you can force it by opening this file src/Fulma/Elements/Button.fs. Took around 35 sec
  9. Undo the change made to Fulma/Elements/Button.fs
  10. Wait for the error to disappearu. Took 45 sec
  11. Go to src/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.button

With 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

language services performance

Most helpful comment

This should be better in Ionide 4.0

All 8 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MikaelUmaN picture MikaelUmaN  路  5Comments

isaacabraham picture isaacabraham  路  4Comments

dustinmoris picture dustinmoris  路  3Comments

draganjovanovic1 picture draganjovanovic1  路  3Comments

bruno-cadorette picture bruno-cadorette  路  4Comments