neoremind opened a new pull request #1875: [CALCITE-3873] Use global caching 
for ReflectiveVisitDispatcher implementation
URL: https://github.com/apache/calcite/pull/1875
 
 
   By examining a simple query through flame graph (see 
[issue](https://issues.apache.org/jira/browse/CALCITE-3873)), one interesting 
point is that I find there are too many calls using reflection, which is not 
performant, although the total overhead is less than 1%, I still spend some 
time trying to improve. Most invocations are rooted down to 
`ReflectiveVisitDispatcher`, the current implementation creates new instance 
whenever needed, and looking up methods by reflection per instance, I think by 
caching methods globally, as the methods count is countable to 68 possible 
places, different `ReflectiveVisitDispatcher` in different thread is able to 
reuse. The fundamental change will benefit other likewise invocations as well.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to