richardstartin opened a new issue #7403:
URL: https://github.com/apache/pinot/issues/7403


   In a profile collected from a user, we see over 20% of CPU time in 
JSONPath's `LRUCache` 
   
![Capture](https://user-images.githubusercontent.com/16439049/132392314-9f279512-2095-40d7-9593-ed6a62ff2dcc.PNG)
   
   This is caused by contention caused by locking:
   
![CaptureLock](https://user-images.githubusercontent.com/16439049/132392518-78eaa02b-2591-454b-add9-8b1ad67ddf38.PNG)
   
   The cache exists to prevent from compiling JSONPaths repeatedly, and uses an 
LRU mechanism to avoid high memory consumption in unknown use cases where there 
could be an unbounded number of JSON paths. In Pinot, the number of JSON paths 
is bounded by the size of the transformation config, so this caching mechanism 
is inappropriate.
   
   It is possible to override the cache implementation by calling 
`com.jayway.jsonpath.spi.cache.CacheProvider.setCache(new MyCache());`. The 
user implemented `Cache` backed by a `ConcurrentHashMap` and reported that the 
issue was resolved - so this should be investigated and the user would like to 
contribute the implementation which they are now using in production.


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to