Transaction performance issues at starting a spring boot application on windows using RHDM 7

Solution Unverified - Updated -

Issue

When starting a spring boot app on a windows laptop, rules are compiling and in this process calls the ClassLoader.loadClass method thousands and thousands of times. This logic includes a call to Spring Boot’s LaunchedURLClassLoader, which opens and unzips the JAR on every call. This scan the executable JAR logic is the source of the long start times.

Is there an efficient way to compile rules without running in runtime ?. As per log file, its showing the following behaviour:

o.k.a.i.utils.ServiceDiscoveryImpl       :  Added Service org.drools.mvel.MVELConstraintBuilder with priority 0
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added Service org.drools.mvel.MVELCoreComponentsBuilder with priority 0
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added Service org.drools.mvel.asm.ClassFieldAccessorFactory with priority 0
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added Service org.drools.mvel.asm.DefaultClassBuilderFactory with priority 0
o.k.a.i.utils.ServiceDiscoveryImpl       :  Loading kie.conf from jar:file:/C:/git/claim-validationapi/claim-validationapi/target/claim-validationapi.jar!/BOOT-INF/lib/jbpm-bpmn2-7.48.0.Final.jar!/META-INF/kie.conf in classloader org.springframework.boot.loader.LaunchedURLClassLoader@31221be2
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added Service org.jbpm.bpmn2.BPMN2ProcessProviderImpl with priority 0
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added Service org.jbpm.bpmn2.xml.XmlProcessDumperFactoryServiceImpl with priority 0
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added child Service +org.jbpm.assembler.BPMN2AssemblerService
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added child Service +org.jbpm.weaver.BPMN2WeaverService
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added child Service +org.jbpm.assembler.DRFAssemblerService
o.k.a.i.utils.ServiceDiscoveryImpl       :  Added child Service +org.jbpm.weaver.DRFWeaverService

Currently it is running 39 DRT/CSV template-based rule file pairs, and 217 DRL files. Most of the DRTs and DRLs contain only one rule per file, but some have 3 or 4 rules each.
The fact is that it takes only 3 minutes to start the application on Linux, instead of 10-15 on Windows.

Environment

  • Spring Boot 2.2.10 application
  • Red Hat Decision Manager (RHDM)
    • 7.10.1
  • Windows 10 laptop
  • JDK 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content