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

Slow build due to inefficient EnumServiceImpl.doValidation() call

XMLWordPrintable

    • CR1
    • -

      In a live environment with ~1300 assets, the project build takes ~20 minutes when invoked in decision-central.

      Using a debugger, I observe that one execution of KieModuleMetaInfo.unmarshallMetaInfos() takes 20 seconds. It's called from EnumServiceImpl.validate().

      at org.drools.core.rule.KieModuleMetaInfo.unmarshallMetaInfos(KieModuleMetaInfo.java:49)
      at org.kie.scanner.KieModuleMetaDataImpl.indexMetaInfo(KieModuleMetaDataImpl.java:251)
      at org.kie.scanner.KieModuleMetaDataImpl.indexKieModule(KieModuleMetaDataImpl.java:100)
      at org.kie.scanner.KieModuleMetaDataImpl.<init>(KieModuleMetaDataImpl.java:85)
      at org.kie.scanner.KieModuleMetaData$Factory.newKieModuleMetaData(KieModuleMetaData.java:60)
      at org.kie.scanner.KieModuleMetaData$Factory.newKieModuleMetaData(KieModuleMetaData.java:48)
      at org.drools.workbench.screens.enums.backend.server.EnumServiceImpl.doValidation(EnumServiceImpl.java:272)
      at org.drools.workbench.screens.enums.backend.server.EnumServiceImpl.validate(EnumServiceImpl.java:263)
      at org.drools.workbench.screens.enums.backend.server.EnumServiceImpl.validate(EnumServiceImpl.java:253)
      at org.drools.workbench.screens.enums.backend.server.EnumServiceImpl$Proxy$_$$_WeldClientProxy.validate(Unknown Source)
      at org.kie.workbench.common.services.backend.builder.core.Builder.build(Builder.java:238)
      

      However, EnumServiceImpl.validate() is repeatedly called in a loop in Builder.build(). So all ".enumeration" files call this method (this project has 18 .enumeration files). It results in 6 min in my env.

      Probably the unmarshalled KieModuleMetaInfo can be cached?

              manstis@redhat.com Michael Anstis
              rhn-support-mputz Martin Weiler (Inactive)
              Jozef Marko Jozef Marko (Inactive)
              Jozef Marko Jozef Marko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: