jamesnetherton commented on PR #8289:
URL: https://github.com/apache/camel-quarkus/pull/8289#issuecomment-3885314626

   The reason for the change is that some Camel Groovy script operations lead 
to usage of invokedymanic and a code path to 
`java.lang.invoke.MethodHandleNatives.setCallSiteTargetNormal`.  That method is 
[deleted](https://github.com/oracle/graal/blob/70b9a98abc80bbdc54145dd84edfbfe94b6e836b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/methodhandles/Target_java_lang_invoke_MethodHandleNatives.java#L208-L209)
 in GraalVM.
   
   It's a problem for things like this:
   
   ```groovy
   from("direct:scriptGroovy")
           .script()
           .groovy("exchange.getMessage().setBody('Hello ' + 
exchange.getMessage().getBody(String.class) + ' from Groovy!')");
   ```
   
   Because the `String` cast from `.getBody(String.class)` results in 
`invokedymanic` usage.
   
   > Can you precise what is the impact for end-users? They cannot use some 
functionalities of Groovy in native mode?
   
   TBH it's a little bit unknown because we can't realistically test everything 
you can do with Groovy APIs.
   
   There may be a performance impact. However, in the case of most Camel 
integrations, I'd hope that it's relatively low. I assume most users are 
unlikely to be writing large complicated scripts. Typical usage is limited to 
simple expressions. 
   
   As far as our test suite goes, I don't observe any big difference compared 
to the previous state.
   
   This is only for native mode. JVM works as per vanilla Camel.


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

Reply via email to