You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/03/23 14:06:25 UTC

[jira] [Commented] (CAMEL-8602) Java 8: ConcurrentLinkedHashMap -> Caffeine

    [ https://issues.apache.org/jira/browse/CAMEL-8602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208372#comment-15208372 ] 

Claus Ibsen commented on CAMEL-8602:
------------------------------------

Working on this. The eviction list runs async so we need to force a cleanup in our unit tests or use thread sleeps. But the force cleanUp works the best and fastest.

Otherwise the code changes wasnt that bad. And caffine offers weak/soft out of the box we can turn on in our soft/weak caches.

> Java 8: ConcurrentLinkedHashMap -> Caffeine
> -------------------------------------------
>
>                 Key: CAMEL-8602
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8602
>             Project: Camel
>          Issue Type: Task
>          Components: camel-core
>            Reporter: Ben Manes
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.18.0
>
>
> When Camel transitions to requiring Java 8, please upgrade to Caffeine. The performance should be relatively the same. The per-instance memory usage should be smaller and Camel may decide to opt-in to use some of the additional features. The only drawback is that the jar size is larger due to code generation, though that may be trimmed over time and usually is not a concern for server-side applications.
> ConcurrentLinkedHashMap changes will continue to be minimal, even more so now, and driven by requests from Java 6 users unable to upgrade. Caffeine is ideally the upgrade path for Guava cache users too, which due to Android cannot be significantly modified.
> Caffeine: https://github.com/ben-manes/caffeine
> Benchmarks: https://github.com/ben-manes/caffeine/wiki/Benchmarks
> ConcurrentLinkedHashMap: https://code.google.com/p/concurrentlinkedhashmap



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)