Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Abandoned
-
5.0.15
-
None
-
None
-
None
Description
From the department of premature optimization:
For services that are scope "perthread", the service implementation will be invoked repeatedly, via either invoking a constructor, or invoking a (static or instance) builder method on a module class.
Currently each such instantiation requires calculating the method/constructor parameters (somewhat expensive) and invocations of the method/constructor via reflection (borderline expensive).
The code responsible for this could track the number of instantitations and, on the second (or later) pass, create a "shim" class responsible for performing the same operations in a non-reflective way.