Drools rules compilation performance

萝らか妹 提交于 2019-12-11 15:37:30

问题


I'm using Drools 6.4.0.Final programmatically (no workbench) in an web app (a web service). I have 28 drl files containing 177 rules. Compilation time of these rules, on a given machine, varies considerably dependending on the execution context.

I have these contexts:

  1. JUnit test cases of the rules: 1 minute
  2. JUnit test cases of the whole application (end-to-end tests): 3 minutes
  3. Deploy of the whole application with Spring Boot: 4 minutes
  4. Deploy of the whole application on JBoss EAP 6.3: 1 minute

The reported times refer to DRL compilation only (i.e. execution of KieBuilder.buildAll() method).

The difference between JBoss and Spring Boot (i.e. Tomcat) could be explained supposing that JBoss has some "secret" optimization for Drools that Tomcat has not, but what about the difference between case #1 and #2? Both are executed by JUnit within Eclipse without any application server.

In Drools v5 there was a bug named "Compilation performance for rules degrades as the classpath increases" (https://issues.jboss.org/browse/JBRULES-2067), and, of course, the classpath of the whole application (case #2) is bigger than the one used to execute only the rules (case #1); but that bug is reported as fixed. So the question is: what parameters affect compilation time besides number/content of drl files and hardware speed, that, in my cases, are invariant? And also what can I do to get JBoss performance (case #4) also in case #2 and #3?


回答1:


Likely cause is this

Fix is in 7.1.0.Final



来源:https://stackoverflow.com/questions/45923356/drools-rules-compilation-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!