Balazs Szücs created ISPN-7492:
----------------------------------
Summary: Bad Performance in cache.values() due to Logging
Key: ISPN-7492
URL:
https://issues.jboss.org/browse/ISPN-7492
Project: Infinispan
Issue Type: Enhancement
Components: Core
Affects Versions: 8.2.6.Final
Reporter: Balazs Szücs
h4. Test case:
{code:java}
ache.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL, Flag.SKIP_CACHE_LOAD).values()
{code}
h4. Problem:
when calling values() frequently, this operation becomes quickly a performance bottleneck
h4. Root problem:
in AbstractLocalCacheStream the logger is initialized on each object creation. Internally
JBoss Logging loads the class by reflection, consuming a lot of resources.
{code:java}
protected final Log log = LogFactory.getLog(getClass());
{code}
Additionally, this log instance is never used in AbstractLocalCacheStream or in any
subclasses.
h4. Possible solution:
removing
{code:java}
protected final Log log = LogFactory.getLog(getClass());
{code}
causes a drastical speedup of values()
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)