Search code examples
wpfvisual-studio-2015zedgraph

ZedGraphControl constructor suddenly takes a lot of memory


I have a WPF application that I've been using about 1 year ago. Suddenly it started taking a lot of time to start when running it from VS2015 (around 5 minutes).

I checked the task manager and it seems that the application's instance is taking 8,500 MB from memory on startup, while decreasing to around 3,900 MB later.

I created a release folder and tried it on several PCs and it worked fine. It seems that this problem is only on my PC.

EDIT

I started debugging my program after InitializeComponent() and found out that using ZedGraphControl zedGraph = new ZedGraphControl(); is the one causing this problem. I tried to run old solutions that have been working before and now I have the same problem on them.

Note that I have been using ZedGraphControl in many projects and even in this project but this behavior suddenly appeared.


Solution

  • Check in your Windows Update History if you have installed the Cumulative Update KB5001337 (for Windows 10). In my case, that was the culprit. Uninstalling KB5001337 should help (at least temporary). Updating Windows 10 to version 20H2 will also solve the problem.