[JBoss JIRA] Created: (JBRULES-2685) Performance degradation from 5.0.1 to 5.1.0
by Greg Barton (JIRA)
Performance degradation from 5.0.1 to 5.1.0
-------------------------------------------
Key: JBRULES-2685
URL: https://jira.jboss.org/browse/JBRULES-2685
Project: Drools
Issue Type: Quality Risk
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.1.0.FINAL
Environment: OSX 1.6.2
Reporter: Greg Barton
Assignee: Mark Proctor
Priority: Minor
Attachments: DroolsNested.tar.gz
I've observed a sizable (25%) performance degradation between the 5.0.1 and 5.1.0 releases. I've attached a sample project that tests the performance of matching nested objects. (ANd compares direct reference matching and the performance pitfalls of "from," but that's beside the current point.)
If you switch the pom.xml from using 5.0.1 to 5.1.0 for the drools dependencies you'll see 25% longer execution times on the tests. (mvn test)
Here's the test output:
5.0.1
reference.drl Count: 2000
reference.drl Time: 267ms
reference.drl Time per element: 0.1335ms
BAR Duplicates: 780
FOO Duplicates: 880
reference.drl Count: 20000
reference.drl Time: 1249ms
reference.drl Time per element: 0.06245ms
BAR Duplicates: 7702
FOO Duplicates: 8040
from.drl Count: 200
from.drl Time: 1139ms
from.drl Time per element: 5.695ms
BAR Duplicates: 112
FOO Duplicates: 102
reference.drl Count: 200
reference.drl Time: 5ms
reference.drl Time per element: 0.025ms
BAR Duplicates: 86
FOO Duplicates: 60
5.1.0
reference.drl Count: 2000
reference.drl Time: 300ms
reference.drl Time per element: 0.15ms
BAR Duplicates: 788
FOO Duplicates: 820
reference.drl Count: 20000
reference.drl Time: 1564ms
reference.drl Time per element: 0.0782ms
BAR Duplicates: 8142
FOO Duplicates: 7960
from.drl Count: 200
from.drl Time: 3543ms
from.drl Time per element: 17.715ms
BAR Duplicates: 68
FOO Duplicates: 90
reference.drl Count: 200
reference.drl Time: 13ms
reference.drl Time per element: 0.065ms
BAR Duplicates: 84
FOO Duplicates: 74
On the most taxing test (20k objects) 5.0.1 took 1249ms while 5.1.0 took 1564ms, and for larger tests the effect is more pronounced. This is primarily a test of == on object references.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-2590) Maven build fails in Linux with LANG=fr_FR.utf8
by Jean-Marc Vanel (JIRA)
Maven build fails in Linux with LANG=fr_FR.utf8
------------------------------------------------
Key: JBRULES-2590
URL: https://jira.jboss.org/browse/JBRULES-2590
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: % uname -a
Linux jmv-desktop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
% java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Reporter: Jean-Marc Vanel
Assignee: Mark Proctor
With sources from Subversion, making a Maven build on drools-trunk gives 3 errors :
Tests in error:
testDate(org.drools.base.FieldFactoryTest)
testString(org.drools.base.mvel.MVELCalendarCoercionTest)
testString(org.drools.base.mvel.MVELDateCoercionTest)
Tests run: 578, Failures: 0, Errors: 3, Skipped: 1
[ERROR] BUILD FAILURE
However this runs fine:
LANG=en mvn install
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-2298) Can't use functions when MVEL dialect is set at package level
by Michael Neale (JIRA)
Can't use functions when MVEL dialect is set at package level
-------------------------------------------------------------
Key: JBRULES-2298
URL: https://jira.jboss.org/jira/browse/JBRULES-2298
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.1.FINAL
Reporter: Michael Neale
Assignee: Edson Tirelli
Priority: Critical
package jboss.cloud
dialect "mvel"
#trying to get functions working...
rule "something"
when
s: SimpleFact(id == 42, name == "michael")
then
System.out.println("hello");
end
function String doSomething() {
return "hey";
}
And I get:
java.lang.NullPointerException
at org.drools.rule.builder.dialect.mvel.MVELDialect.compile(MVELDialect.java:510)
at org.drools.rule.builder.dialect.mvel.MVELDialect.addFunction(MVELDialect.java:338)
at org.drools.compiler.PackageBuilder.addFunction(PackageBuilder.java:1104)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:626)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-2797) HashTableIterator of AbstractHashTable is not Thread Safe
by Anatoly Polinsky (JIRA)
HashTableIterator of AbstractHashTable is not Thread Safe
----------------------------------------------------------
Key: JBRULES-2797
URL: https://jira.jboss.org/browse/JBRULES-2797
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core, drools-core (flow)
Affects Versions: 5.1.1.FINAL, FUTURE
Environment: N/A
Reporter: Anatoly Polinsky
Assignee: Mark Proctor
public static class HashTableIterator has a shared state that gets inconsistent when multiple threads work on the getting the next entity:
public Object next() {
if ( this.entry != null ) {
PART 1 >> this.entry = this.entry.getNext();
}
// if no entry keep skipping rows until we come to the end, or find one that is populated
while ( this.entry == null && ++this.row < this.length ){
PART II >> this.entry = this.table[this.row];
}
return this.entry;
}
In "PART 1", the race condition causes "this.entry" be NULL in "this.entry.getNext()", and throws the exception below.
In "PART 2", the race condition causes inconsistent state of "this.row", and throws multiple exceptions, but mostly the one that is described in: https://jira.jboss.org/browse/JBRULES-2794
java.util.concurrent.ExecutionException: org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction@1ff323
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.custom.workflow.stress.test.WorkflowStressTest.shouldRunFlow(WorkflowStressTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:192)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction@1ff323
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1473)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1631)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:318)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:99)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:38)
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:285)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:193)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)
at org.custom.workflow.stress.test.WorkflowRunner.call(WorkflowRunner.java:38)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.drools.core.util.AbstractHashTable$HashTableIterator.next(AbstractHashTable.java:312)
at org.drools.reteoo.EntryPointNode.updateSink(EntryPointNode.java:323)
at org.drools.reteoo.ObjectTypeNode.attach(ObjectTypeNode.java:303)
at org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:257)
at org.drools.reteoo.ClassObjectTypeConf.<init>(ClassObjectTypeConf.java:92)
at org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:68)
at org.drools.reteoo.Rete.assertObject(Rete.java:111)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:280)
at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:360)
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1471)
... 24 more
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-1665) put offending rule name in exception messages
by Alex McCarrier (JIRA)
put offending rule name in exception messages
---------------------------------------------
Key: JBRULES-1665
URL: http://jira.jboss.com/jira/browse/JBRULES-1665
Project: JBoss Drools
Issue Type: Feature Request
Components: Drl Parser/Builder
Affects Versions: FUTURE
Environment: all
Reporter: Alex McCarrier
Assigned To: Mark Proctor
Priority: Minor
It would be nice if drools compiler error messages would include the rule that caused the error. For instance, predicate eval errors, or "unable to resolve property" errors would state which rule was being evaluated when it encountered an error. Currently the developer has to go through the rules file looking for lines similar to the one reported in the error. Also, when it's this much work for a developer to find the offending rule, it is pretty much impossible for business users to figure out which rule they messed up.
If it's at all possible to add the rule name to these error messages, please do so. It would make our lives a lot easier. :)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-680) Support real-time problem modification during solving with utils for the single thread subsystem
by Geoffrey De Smet (JIRA)
Support real-time problem modification during solving with utils for the single thread subsystem
------------------------------------------------------------------------------------------------
Key: JBRULES-680
URL: http://jira.jboss.com/jira/browse/JBRULES-680
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Solver
Reporter: Geoffrey De Smet
Assigned To: Geoffrey De Smet
Rete/Drools is single threaded, and so is the current implementation of the localsearchsolver,
but this single thread subsystem should be documented
and utils should be provided to allow for real-time problem modification
A simple way would be to use a producer-consumer pattern with a non blocking queue which holds "problem moves".
Each step the problem moves could be used.
Problems:
- bestsolutionrecalled also needs it's score adjusted. so we'll need a 2th working memory:
-- EITHER temporary, just for the problem move (or set of problem moves)
-- EITHER all the time, but then we'd have to hold a chain of moves, some of which might not be doable at the end
- cached selectors must be notified of refreshing their cache
- solution cloning normally doesn't clone the problem facts, just the proposed solution references. Do we need a full clone now?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-2748) Missing drools-flow-compiler dependency in trunk\drools-examples\drools-examples-fusion\pom.xml
by Michael Anstis (JIRA)
Missing drools-flow-compiler dependency in trunk\drools-examples\drools-examples-fusion\pom.xml
-----------------------------------------------------------------------------------------------
Key: JBRULES-2748
URL: https://jira.jboss.org/browse/JBRULES-2748
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.1.1.FINAL
Environment: All
Reporter: Michael Anstis
Assignee: Mark Proctor
Fix For: FUTURE
java.lang.NullPointerException
at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:432)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:468)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at org.drools.examples.broker.Broker.loadRuleBase(Broker.java:95)
at org.drools.examples.broker.Broker.createSession(Broker.java:80)
at org.drools.examples.broker.Broker.<init>(Broker.java:57)
at org.drools.examples.broker.Main.main(Main.java:53)
When running drools-examples Fusion Broker example.
Patch:-
Index: pom.xml
===================================================================
--- pom.xml (revision 35658)
+++ pom.xml (working copy)
@@ -26,6 +26,10 @@
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-flow-compiler</artifactId>
+ </dependency>
<!-- External dependencies -->
<dependency>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-2244) MVEL raising errors for declared types when there is a package import (import x.y.x.*)
by Edson Tirelli (JIRA)
MVEL raising errors for declared types when there is a package import (import x.y.x.*)
--------------------------------------------------------------------------------------
Key: JBRULES-2244
URL: https://jira.jboss.org/jira/browse/JBRULES-2244
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler, drools-core
Affects Versions: 5.0.1.FINAL, 5.0.0.FINAL
Reporter: Edson Tirelli
Assignee: Edson Tirelli
Fix For: 5.1.0.M1
The following DRL:
===================================================
package org.drools.examples.broker
import org.drools.examples.broker.model.*;
declare Statistics
symbol : String @key()
average : double
end
rule "Setup statistics"
when
$c : Company( $s : symbol )
not( Statistics( symbol == $s ) )
then
Statistics s = new Statistics();
s.symbol = $s;
insert( s );
end
===================================================
Generates the error:
-----------------------------
BuildError: Unable to build expression for 'consequence': Failed to compile: 1 compilation error(s):
- (1,10) unqualified type in strict mode for: Statistics ' Statistics s = new Statistics();
s.symbol = $s;
insert( s );
' broker.drl drools-examples-fusion/src/main/rules line 42 Drools Error
-----------------------------
But if we change the import to:
===================================================
import org.drools.examples.broker.model.Company
import org.drools.examples.broker.model.StockTick
import org.drools.examples.broker.model.SuddenDropEvent
===================================================
Everything works just fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-1801) drools-ant-4.0.7, DroolsCompilerAntTask, classloader mixup leads to ClassCastException if drools-compiler.jar part of classpathref
by Juergen none (JIRA)
drools-ant-4.0.7, DroolsCompilerAntTask, classloader mixup leads to ClassCastException if drools-compiler.jar part of classpathref
----------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-1801
URL: https://jira.jboss.org/jira/browse/JBRULES-1801
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-ant
Affects Versions: 4.0.7
Reporter: Juergen none
Assignee: Mark Proctor
drools-4.0.7:
Original error in build.xml:
/home/juergen/workspace/eclipse/kusss-dev/build.xml:777: RuleBaseTask failed: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
Traceback to:
org.drools.compiler.PackageBuilderConfiguration, line 154+:
Class cls = classLoader.loadClass( dialectClass );
DialectConfiguration dialectConf = (DialectConfiguration) cls.newInstance();
cls is org.drools.rule.builder.dialect.java.JavaDialectConfiguration, but loaded via classloader given in drools compile ant task property classpathref, while DialectConfiguration is loaded via ant tool classpath used for taskdef
-->
java.lang.ClassCastException: org.drools.rule.builder.dialect.java.JavaDialectConfiguration
interim fix:
make sure drools-compiler.jar is not in classpath of classloaderref
suggested fix:
Class cls = DialectConfiguration.class.getClassLoader().loadClass( dialectClass );
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months