[infinispan-dev] Consolidating temporary per-key data

Radim Vansa rvansa at redhat.com
Mon Nov 23 10:26:24 EST 2015


Hi again,

examining some flamegraphs I've found out that recently the 
ExpirationInterceptor has been added, which registers ongoing write in a 
hashmap. So at this point we have a map for locks, map for writes used 
for expiration, another two key-addressed maps in L1ManagerImpl and one 
in L1NonTxInterceptor and maybe another maps elsewhere.

This makes me think that we could spare map lookups and expensive writes 
by providing *single map for temporary per-key data*. A reference to the 
entry could be stored in the context to save the lookups. An extreme 
case would be to put this into DataContainer, but I think that this 
would prove too tricky in practice.

A downside would be the loss of encapsulation (any component could 
theoretically access e.g. locks), but I don't find that too dramatic.

WDYT?

Radim

-- 
Radim Vansa <rvansa at redhat.com>
JBoss Performance Team



More information about the infinispan-dev mailing list