-
Notifications
You must be signed in to change notification settings - Fork 852
Description
Scenario:
◾Disable VFPT in VS if it is installed
◾Open VFPT solution (https://github.com/fsprojects/VisualFSharpPowerTools), VS occupies ~ 300MB RAM
◾Repeat the following steps 15 times: (1) Switch to a new git branch (2) Reload the solution (3) Rebuild the solution
◾VS now occupies ~ 1.7 GB RAM
Context:
We are hunting down memory leaks in Visual F# Power Tools. It turned out FSharp.Compiler.Service (FCS) leaked memories when Xaml type providers (FsXaml) didn't dispose resources correctly. These bugs have been fixed in FCS and FsXaml. See the discussion at fsharp/fsharp-compiler-docs#158.
After bug fixing, there are still memory leaks. I think Visual F# Tools has the same issue where type providers are in use. We did profile using PerfView without enabling VFPT. Here is a diff of two snapshots where we reload and rebuild solutions twice.
https://cloud.githubusercontent.com/assets/941060/3277997/c56876ec-f39f-11e3-8042-4840c6cffffd.png
https://cloud.githubusercontent.com/assets/941060/3278000/13a16d6e-f3a0-11e3-97cd-b994b8086d8e.png
Configuration:
- Visual Studio 2013
- Windows 7
- A recent build of Visual F# Tools 3.1.1
I believe the fix should be similar to that of FCS. Here are relevant commits:
fsharp/fsharp-compiler-docs@a325df2
fsharp/fsharp-compiler-docs@4e7c8bc
Let me know if you need more information.