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

   ### Motivation
   `java.lang.reflect` Field/Constructor invocation bypasses JIT inlining, 
causing unnecessary overhead in hot paths like InfluxDB result mapping and HDFS 
sequence file reading.
   
   ### Modification
   - **InfluxDB mapper** (`PekkoConnectorsResultMapperHelper`): Replace 
`java.lang.reflect.Field` cache with `VarHandle`-based `ColumnInfo` cache; 
replace `Constructor.newInstance()` with cached `MethodHandle.invoke()`; move 
caches to companion object for cross-instance sharing
   - **HDFS source** (`HdfsSource`): Replace 
`getDeclaredConstructor().newInstance()` in iterator hot loop with cached 
`MethodHandle.invoke()`
   - **Jakarta JMS test** (`JmsConnectorsSpec`): Replace 
`getDeclaredFields().filter` pattern with `VarHandle.get` via 
`getDeclaredField` + `unreflectVarHandle`
   
   ### Result
   `VarHandle` and `MethodHandle` enable JIT inlining of field access and 
constructor invocation, reducing overhead in data-mapping hot paths.
   
   ### Tests
   - `sbt "influxdb / compile"` - success
   - `sbt "hdfs / compile"` - success
   - `sbt "jakartams / Test / 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