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

Improve performance when configuring fake method #1470

Closed
blairconrad opened this issue Oct 6, 2018 · 8 comments
Closed

Improve performance when configuring fake method #1470

blairconrad opened this issue Oct 6, 2018 · 8 comments

Comments

@blairconrad
Copy link
Member

AssemblyExtesions.Name creates a new AssemblyName when I don't think it has to.
If I stop:

image

And garbage collection time drops from 16% to 6%.

Or if you like the diff format:

image

@thomaslevesque
Copy link
Member

Wow. I didn't expect the AssemblyName constructor to be so expensive.

@blairconrad
Copy link
Member Author

Oh. I have a better thing.

image

@thomaslevesque
Copy link
Member

OK... how did you do it ?

@thomaslevesque
Copy link
Member

Ah, I see. ProxyUtil.IsProxyType!

@blairconrad blairconrad changed the title Improve performance by not creating new AssemblyNames Improve performance when configuring fake method Oct 8, 2018
@blairconrad
Copy link
Member Author

I marked #1472 as connecting to this issue in case we want to pile on a few more PRs. If you'd rather, I don't mind closing this issue with the one PR and opening more issues (or just sending raw PRs) for other performance work in the area.

@thomaslevesque
Copy link
Member

No, I think it's OK to keep this one open for now.

@blairconrad
Copy link
Member Author

This could be a never-ending process, but we've had good results. I think I'll focus my efforts somewhere else for a while.
Closed in #1472, #1476, #1483, #1485, and #1486.

@blairconrad blairconrad added this to the vNext milestone Nov 8, 2018
@thomaslevesque
Copy link
Member

This change has been released in FakeItEasy 5.0.0.

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

No branches or pull requests

2 participants