He-Pin opened a new pull request, #782:
URL: https://github.com/apache/pekko-grpc/pull/782

   ### Motivation
   `Class.forName().getDeclaredConstructor().newInstance()` bypasses JIT 
optimization for constructor invocation in code generator loading.
   
   ### Modification
   Replace `getDeclaredConstructor().newInstance()` with 
`MethodHandles.lookup().unreflectConstructor().invoke()` in both the protoc 
plugin `Main` and the Maven plugin `AbstractGenerateMojo` for extra generator 
instantiation.
   
   ### Result
   `MethodHandle`-based invocation enables JIT inlining of constructor calls, 
providing a consistent reflection migration across the project.
   
   ### Tests
   - `sbt "codegen / compile"` - success
   - `sbt "maven-plugin / compile"` - success
   
   ### References
   None - internal refactoring


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to