Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Performance Improvement - Move Reflection calls to static initializer #15

Open
BrunoJuchli opened this issue Jul 28, 2017 · 0 comments
Open

Comments

@BrunoJuchli
Copy link
Owner

BrunoJuchli commented Jul 28, 2017

StaticProxy.Fody:

For generated classes and proxied-classes, all reflection calls should be moved to a static intializer and henceforth referenced in the called methods.

Otherwise each method call also induces one or multiple reflection calls.

If a *static constructor" is used for this task, this also requires removing "beforefieldinit" from class' attributes. See: http://csharpindepth.com/Articles/General/Beforefieldinit.aspx

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

1 participant