You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Jira)" <ji...@apache.org> on 2026/10/12 17:58:00 UTC
[jira] [Updated] (CAY-3049) Cheap ClockMap to replace ConcurrentLinkedHashMap
[ https://issues.apache.org/jira/browse/CAY-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik updated CAY-3049:
---------------------------------
Description:
ConcurrentLinkedHashMap is a nice data structure (its successor is currently maintained as a part of the Caffeine project). But it is an overkill for our needs and also our older version has some undesired performance costs. Let's replace it with a simple "ClockMap" built on top of ConcurrentHashMap that does some simple sweeping of unused entries.
This will relax the LRU guarantees (the map size can overshoot sometimes), but we'll gain a noticeable performance boost on select (~20-40%)
was:
ConcurrentLinkedHashMap is a nice data structure (its successor is currently maintained as a part of the Caffeine project). But it is an overkill for our needs and also our older version has some undesired performance costs. Let's replace it with a simple "ClockMap" built on top of ConcurrentHashMap that does some simple sweeping of unused entries.
This will relax the LRU guarantees (the map size can overshoot sometimes), but we'll gain a noticeable performance boost on select (~20%)
> Cheap ClockMap to replace ConcurrentLinkedHashMap
> -------------------------------------------------
>
> Key: CAY-3049
> URL: https://issues.apache.org/jira/browse/CAY-3049
> Project: Cayenne
> Issue Type: Task
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Priority: Major
> Fix For: 5.0-M4
>
>
> ConcurrentLinkedHashMap is a nice data structure (its successor is currently maintained as a part of the Caffeine project). But it is an overkill for our needs and also our older version has some undesired performance costs. Let's replace it with a simple "ClockMap" built on top of ConcurrentHashMap that does some simple sweeping of unused entries.
> This will relax the LRU guarantees (the map size can overshoot sometimes), but we'll gain a noticeable performance boost on select (~20-40%)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)