0
votes

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
Is really the same amount of recompilation done in all cases? I suggest you look at the timestamp of all class files.laune
My problem is related to compilation of drl files made by Drools at run-time: no class file is generated AFAIK, and I'm sure that source drl files are the same in all cases.Pino

1 Answers

1
votes

Likely cause is this

Fix is in 7.1.0.Final