在C#监控垃圾收集器垃圾、收集器

2023-09-02 10:43:28 作者:听说你心里有人了

我有一个WPF应用程序,它正在经历一个很大的性能问题。其中最糟糕的是,有时候应用程序只是冻结了几秒钟,然后再次运行前。

I have a WPF application that is experiencing a lot of performance issues. The worst of them is that sometimes the application just freezes for a few seconds before running again.

我目前正在调试应用程序,看看这个冻结可能与,我相信的东西,可能会导致它一个是垃圾收集器。由于我的应用程序是在一个非常有限的环境中运行,我认为,垃圾收集器可以使用所有的机器的资源时,它跑了,留下没有给我们的应用程序。

I am currently debugging the application to see what this freeze might be related to, and I believe that one of things that may be causing it is the Garbage Collector. Since my application is running in a very limited environment, I believe that the Garbage Collector can be using all of the machine's resources when it is ran and leaving none to our application.

要检查这个假设,我发现这些文章:垃圾回收通知和的