Drools规范编译性能 [英] Drools rules compilation performance

查看:319
本文介绍了Drools规范编译性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Web应用程序(Web服务)中以编程方式(无工作台)使用Drools 6.4.0.Final。我有28个包含177条规则的drl文件。在给定的机器上,这些规则的编译时间根据执行上下文的不同而有很大差异。

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.

我有以下上下文:


  1. 规则的JUnit测试用例:1分钟

  2. 整个应用程序的JUnit测试用例(端到端测试):3分钟

  3. 使用Spring Boot部署整个应用程序:4分钟

  4. 在JBoss EAP 6.3上部署整个应用程序:1分钟

  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

报告的时间仅指DRL编译(即执行KieBuilder.buildAll()方法)。

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

JBoss和Spring Boot(即Tomcat)之间的差异可以通过假设JBoss对Tomcat没有的Drools进行秘密优化来解释,但是情况#1和#2之间有什么区别?两者都由Eclipse中的JUnit执行,而没有任何应用程序服务器。

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.

在Drools v5中,存在一个名为规则的编译性能随类路径的增加而降低的错误( https://issues.jboss.org/browse/JBRULES-2067 ),当然,整个应用程序的类路径(案例2)大于仅用于执行规则的案例路径(案例1);但是该错误已报告为已修复。所以问题是:除了drl文件的数量/内容和硬件速度之外,哪些参数会影响编译时间,在我看来,这些参数是不变的?还有在第二种情况和第三种情况下如何获得JBoss性能(第四种情况)?

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?

推荐答案

原因是

修复程序位于 7.1.0.Final

这篇关于Drools规范编译性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆