[
https://issues.jboss.org/browse/DROOLS-1443?page=com.atlassian.jira.plugi...
]
Hans Lund commented on DROOLS-1443:
-----------------------------------
The strategy for caching is based on resource name and classloader. Very often the
classloader is a ProjectClassLoader - almost always a new instance.
As the ProjectClassLoader do not implement equals and hashCode - the cache quickly runs
full.
Implementing hashcode and equals on the ProjectClassLoader and the
InMemoryResourceProvider have in test reduced the number of entries in the cache to less
than 1% (from +8k entries to 64).
Improve effect of caching in ChainedProperties.
-------------------------------------------------
Key: DROOLS-1443
URL:
https://issues.jboss.org/browse/DROOLS-1443
Project: Drools
Issue Type: Enhancement
Components: core engine
Reporter: Hans Lund
Assignee: Mario Fusco
Priority: Minor
The ChainedProperties utility has a caching setting that will cache the classpath
discovery of property resource - but not the parsing of these resources.
This utility is a hot spot for the initialization of runtime environments - caching the
parsed properties instead of the resource url will improve runtime performance.
Changing the caching strategy will make hot changes to classpath property resources
impossible. File based property files could be made safe cacheable by investigating file
metadata and only read if changed.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)