Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable server garbage collection for ILSpy and ilspycmd #2286

Closed
wwh1004 opened this issue Jan 28, 2021 · 4 comments
Closed

Enable server garbage collection for ILSpy and ilspycmd #2286

wwh1004 opened this issue Jan 28, 2021 · 4 comments
Labels
Enhancement Areas for improvement

Comments

@wwh1004
Copy link
Contributor

wwh1004 commented Jan 28, 2021

Enabling server garbage collection can let ILSpy decompile large project 3x~4x and small project 2x~3x faster than before.
It is easy to enable it:

<configuration>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
</configuration>
@wwh1004 wwh1004 added the Enhancement Areas for improvement label Jan 28, 2021
@wwh1004
Copy link
Contributor Author

wwh1004 commented Jan 28, 2021

Decompile mscorlib in my computer:

no server gc:
Decompilation complete in 16.2 seconds.
server gc:
Decompilation complete in 6.4 seconds.

Decompile default assembly list (mscorlib, System, System.Core, System.Xml, System.Xaml, WindowsBase, PresentationCore, PresentationFramework) as solution in my computer:

no server gc:
Elapsed time: 80.3 seconds.
server gc:
Elapsed time: 21.5 seconds.

@wwh1004 wwh1004 changed the title Enable server garbage collection in ILSpy.exe.config Enable server garbage collection for ILSpy and ilspycmd Jan 28, 2021
@dgrunwald
Copy link
Member

dgrunwald commented Feb 13, 2021

Thanks for the hint!

My run times with ILSpy (master c95da67):
mscorlib without server gc: Decompilation complete in 12,2 seconds.
mscorlib with server gc: Decompilation complete in 5,8 seconds.
default assembly list without server gc: Elapsed time: 58,1 seconds.
default assembly list with server gc: Elapsed time: 29,4 seconds.

dgrunwald added a commit that referenced this issue Feb 13, 2021
This results in significant performance improvements when decompiling a project/solution, cutting the run-time in half.
@dgrunwald
Copy link
Member

I'm not quite sure how this applies to ilspycmd, given that that is using .NET Core.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement Areas for improvement
Projects
None yet
Development

No branches or pull requests

4 participants