ben-manes commented on PR #10157: URL: https://github.com/apache/camel/pull/10157#issuecomment-1560476798
For warmup, a very long time ago the builder had a class loading issue because it selected the implementation by a string switch. That seemed to cause the factory to be slow to classload due to the constant pool. I don’t think it would have tried to load the implementations, but it was oddly visible. The cache uses codegen variants to minimize the memory footprint, e.g. have ttl entry fields only if expirable. That was fixed by using reflection which also trimmed the jar bloat. The current version can instantiate 180k/s. This has done in 2.6.1 (2017). An [unreleased optimization](https://github.com/ben-manes/caffeine/pull/905#issuecomment-1529374389) cached that reflective load so it becomes a direct call on subsequent usages. That resulted in 4M/s. Happy to release it if the current time is still an issue and the snapshot jar shows an improvement. -- 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...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org