Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

High Memory and CPU usage of klr.exe #889

Closed
tugberkugurlu opened this issue Nov 12, 2014 · 1 comment
Closed

High Memory and CPU usage of klr.exe #889

tugberkugurlu opened this issue Nov 12, 2014 · 1 comment

Comments

@tugberkugurlu
Copy link
Contributor

I cloned MVC repository and ran MvcSample.Web while the debugger is attached on VS 2015 Preview. I noticed that the klr.exe has high CPU and memory usage at the beginning of the application start for about a minute of so. After a minute or so, CPU usage went to a low usage but memory usage was around 600mb.

screenshot 2014-11-13 01 16 00

The following is the command line for the process:

"C:\Users\Tugberk.kre\packages\kre-clr-x86.1.0.0-beta2-10679\bin\klr.exe" "C:\Users\Tugberk.kre\packages\kre-clr-x86.1.0.0-beta2-10679\bin\lib\Microsoft.Framework.DesignTimeHost\Microsoft.Framework.DesignTimeHost.dll" 5193 204 32037d6eb7874cb8bdd4052c05f50941

I managed to take the dump of the process if you need it.

davidfowl added a commit that referenced this issue Nov 22, 2014
- Break processing into 2 stages.
  - Project information and dependency resolution
  - Compilation
- Added caching to the dependency resolution and added
a project.json cached dependency.
- Modified ProjectExportProviderHelper to be public and to only
allow filtering the exports via a predicate.
- Removed ANIs from source completely
(this will make an appearance in a later change)
- Always compile when GetDiagnostics or GetCompiledAssembly is called
- This should also greatly reduce the amount of memory consumed by
default. The trade off is that we need to compile on demand when
the runtime requests but that seems to be very fast once roslyn is
warm.

#883 #889
davidfowl added a commit that referenced this issue Nov 23, 2014
- Break processing into 2 stages.
  - Project information and dependency resolution
  - Compilation
- Added caching to the dependency resolution and added
a project.json cached dependency.
- Modified ProjectExportProviderHelper to be public and to only
allow filtering the exports via a predicate.
- Removed ANIs from source completely
(this will make an appearance in a later change)
- Always compile when GetDiagnostics or GetCompiledAssembly is called
- This should also greatly reduce the amount of memory consumed by
default. The trade off is that we need to compile on demand when
the runtime requests but that seems to be very fast once roslyn is
warm.

#883 #889
@davidfowl
Copy link
Member

This should be better in later versions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants