Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1341

Make LambdaIntrospector.methodFingerprintsMap cache size configurable

    Details

    • Type: Task
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.7.0.GA
    • Fix Version/s: 7.8.0.GA
    • Component/s: BRE
    • Labels:

      Description

      Using the executable model, we can see a memory retention in LambdaIntrospector after reloading the kbase multiple times:

      Class Name                                                                                                            | Shallow Heap | Retained Heap
      -----------------------------------------------------------------------------------------------------------------------------------------------------
      org.drools.modelcompiler.util.LambdaIntrospector$1 @ 0xc62e90a8                                                       |           56 |     1,243,424
      |- <class> class org.drools.modelcompiler.util.LambdaIntrospector$1 @ 0xc62c2158                                      |            0 |             0
      |- head java.util.LinkedHashMap$Entry @ 0xc63577e0                                                                    |           40 |        52,080
      |- table java.util.HashMap$Node[64] @ 0xd7283140                                                                      |          272 |           272
      |  |- <class> class java.util.HashMap$Node[] @ 0xc02d3af8                                                             |            0 |             0
      |  |- [49] java.util.LinkedHashMap$Entry @ 0xc6336bf0                                                                 |           40 |        44,472
      |  |- [46] java.util.LinkedHashMap$Entry @ 0xc63577e0                                                                 |           40 |        52,080
      |  |- [30] java.util.LinkedHashMap$Entry @ 0xcb4305f0                                                                 |           40 |        39,760
      |  |- [35] java.util.LinkedHashMap$Entry @ 0xcb4415e0                                                                 |           40 |        23,320
      |  |- [12] java.util.LinkedHashMap$Entry @ 0xcb446c08                                                                 |           40 |        22,104
      |  |- [57] java.util.LinkedHashMap$Entry @ 0xcb44bd70                                                                 |           40 |        47,368
      |  |- [24] java.util.LinkedHashMap$Entry @ 0xcb457f28                                                                 |           40 |        52,672
      |  |- [63] java.util.LinkedHashMap$Entry @ 0xcb46a990                                                                 |           40 |        45,064
      |  |- [14] java.util.LinkedHashMap$Entry @ 0xce1ccaf8                                                                 |           40 |        47,368
      |  |- [45] java.util.LinkedHashMap$Entry @ 0xce1d8400                                                                 |           40 |        39,760
      |  |- [54] java.util.LinkedHashMap$Entry @ 0xce1e41c0                                                                 |           40 |        23,320
      |  |  |- <class> class java.util.LinkedHashMap$Entry @ 0xc02c8090 System Class                                        |            0 |             0
      |  |  |- after java.util.LinkedHashMap$Entry @ 0xce1d8400                                                             |           40 |        39,760
      |  |  |- key org.drools.modelcompiler.util.LambdaIntrospector$ClassIdentifier @ 0xce1e41e8                            |           24 |           280
      |  |  |  |- <class> class org.drools.modelcompiler.util.LambdaIntrospector$ClassIdentifier @ 0xc62e01c0               |            0 |             0
      |  |  |  |- classLoader org.drools.dynamic.DynamicProjectClassLoader$DefaultInternalTypesClassLoader @ 0xcb643360     |           64 |       581,176
      |  |  |  |  |- <class> class org.drools.dynamic.DynamicProjectClassLoader$DefaultInternalTypesClassLoader @ 0xc24d3320|            8 |            32
      |  |  |  |  |- projectClassLoader org.drools.dynamic.DynamicProjectClassLoader @ 0xcb5ed8b8                           |           88 |    45,501,888
      -----------------------------------------------------------------------------------------------------------------------------------------------------
      

      LambdaIntrospector$1 extends LinkedHashMap and its cache size is 32.

      https://github.com/kiegroup/drools/blob/master/drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/util/LambdaIntrospector.java#L38-L45

      The intent of this JIRA is to provide a flag to make this cache size configurable.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tkobayashi Toshiya Kobayashi
                  Reporter:
                  mputz Martin Weiler
                  Tester:
                  Daniel Rosa
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: