[jboss-jira] [JBoss JIRA] (DROOLS-5326) Make LambdaIntrospector.methodFingerprintsMap cache size configurable

Toshiya Kobayashi (Jira) issues at jboss.org
Wed May 13 01:29:51 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Toshiya Kobayashi updated DROOLS-5326:
--------------------------------------
    Summary: Make LambdaIntrospector.methodFingerprintsMap cache size configurable  (was: Make DynamicProjectClassLoader$DefaultInternalTypesClassLoader cache size configurable)


> Make LambdaIntrospector.methodFingerprintsMap cache size configurable
> ---------------------------------------------------------------------
>
>                 Key: DROOLS-5326
>                 URL: https://issues.redhat.com/browse/DROOLS-5326
>             Project: Drools
>          Issue Type: Task
>          Components: executable model
>    Affects Versions: 7.37.0.Final
>            Reporter: Toshiya Kobayashi
>            Assignee: Toshiya Kobayashi
>            Priority: Major
>              Labels: support
>
> Using the executable model, we can see a memory retention in LambdaIntrospector after reloading the kbase multiple times:
> {noformat}
> 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
> -----------------------------------------------------------------------------------------------------------------------------------------------------
> {noformat}
> 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.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list