Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1323

Add caching to the Objenesis instance and move instance to the RuleBase level

    XMLWordPrintable

    Details

    • Type: Patch
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 4.0.3
    • Fix Version/s: 4.0.4, 5.0.0.M1
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  lucker Alexander Gavrilov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: