-
Notifications
You must be signed in to change notification settings - Fork 7
Upgrade into split-system #7
Comments
Note for self: getting rid of reflection is pretty much impossible due to attribute usage... Alternatives is to use static methods in attributes (losing option to use attribute parameters)... Needs to be reconsidered. |
|
If it's impossible, what about just switching to caching the reflections on compile? I am not sure if something along the lines of CreateDelegate would be possible specifically on compile - but if the user's project allows for it, a one time cost at initial runtime could be an option to speed up the invocation by about ~65% based on some scattered benchmarks I've seen this past week Supports AOT on webgl and should work on platforms like IOS and Android |
But you still need to access all instances of specific attribute on specific member to call their methods... At least getting rid of MethodBase::Invoke() is a good start... Copying bodies is out of scope, because it would lose possibility to override arguments/throws/return value etc. Note for future self: |
Also known as splitting method AOP code into separate sub-objects. Will also fix #2 however it requires a bit of coding and bugfixing to prevent issues.
According to SharpLab experiments there might be a slight issue with amount of IL code required to be implemented into method.
@gmrodriguez124 This is what I initally meant, however implementation will be painful to code... (see https://github.com/H1M4W4R1/Unity-Aspect-Oriented-Programming/tree/upgrade-noruntime)
The text was updated successfully, but these errors were encountered: