pjfanning commented on code in PR #561:
URL: https://github.com/apache/pekko-projection/pull/561#discussion_r3529724997


##########
grpc/src/main/scala/org/apache/pekko/projection/grpc/internal/ProtoAnySerialization.scala:
##########
@@ -245,6 +246,9 @@ import scalapb.options.Scalapb
     }
   }
 
+  private def parserHandle(clazz: Class[?]): MethodHandle =
+    parserHandles.getOrElseUpdate(clazz, 
MethodHandles.publicLookup().findStatic(clazz, "parser", parserMethodType))

Review Comment:
   I've seen some suggestions that we should keep a `private val publicLookup = 
MethodHandles.publicLookup()`. Not very important but each call to 
MethodHandles.publicLookup() has a small overhead.



-- 
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