Add caching to the Objenesis instance and move instance to the RuleBase level
-----------------------------------------------------------------------------
Key: JBRULES-1323
URL:
http://jira.jboss.com/jira/browse/JBRULES-1323
Project: JBoss Drools
Issue Type: Patch
Security Level: Public (Everyone can see)
Affects Versions: 4.0.3
Reporter: Alexander Gavrilov
Priority: Critical
Fix For: 4.0.4, 4.1.0
After moving to the 4.0.3 version we are taked notice of application performance
degradation in comarisopn with 4.0.2. Aftert application profiling we found that most time
of page loading takes our permission resolving system based on drools. For each permission
request application creates new statefull session (we use statefull because facts needs a
possibility to be dynamical) and after asserting some facts issued fireAllRules. Further
application profiling lead us to the Objenesis calls. The creation of Objenesis's
instantiator is a very slow operation and the results of instantiators creating was cached
only during the working memorry life cycle (which is very short in our app). So its seems
reasonlibe to turn on Objenesis cache, and move Objenesis instance to the RuleBase level
to avoid memory leaks. The attached patch working for me and after applying our app
working up to ten times faster.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira