AnsweredAssumed Answered

Performance: Tests and Results (oh oh?!)

Question asked by luecking on Jan 18, 2012
Latest reply on Jan 19, 2012 by luecking
I've done some performance testing.

:idea: SZENARIO:
===========
The pure Activiti runtime engine used by a stand-alone application, no server, the in-memory-db, only one thread and a simple flow.
And i have a comparison to our own "old" runtime engine (C++ program), which stores it's own configuration in the windows registry.
The test happens on the same machine (Core2Duo 2GHz, 2GB)

I took a similar flow.
start = start event
end = end event
step = service script with a delegate class, which does nothing.
callAction
subTask
OR = Exclusive gateway

Because of initialization, I do not measure the first run.
I do 1000 runs to get a realistic value.
The results are in ms for _one_ run!

:!: RESULTS:
===========
(1)
start > step > OR > step > OR > step > [callAction: start > step > step > end] > [subTask: start > step > step > end] > [subTask: start > step > step > end] > step > end

Activiti: 130 ms

Based on that, I tried to figure out some details.

(2) Replacing the callAction by subTask.

start > step > OR > step > OR > step > [subTask: start > step > step > end] > [subTask: start > step > step > end] > [subTask: start > step > step > end] > step > end

Activiti: 120 ms


(3) Replacing the subflows by the steps directly.

start > step > OR > step > OR > step > step > step > step > step > step > step > step > end

Activiti: 26 ms


:!: CONCLUSION:
===========
CallActiviti & SubTask are very expensive (to expensive?)
It seems that every instance of a subTask will stored (serialized?) although it is not necessary in some scenarious.

Detailed results:
Step: 2 ms
Subflow: 30 ms
CallAction 40 ms

For the comparison.
Our own "old" runtime needs for scenario number (2):   0,33 ms     :o 


:?: QUESTIONS:
===========
Are there any concepts, ideas, plans, … to optimize the performance of the runtime-engine?
Is it possible to return only the result of a subTask, without storing the whole instance of a subTask?

I'm looking forward for your ideas and remarks.
Thank you for reading and participating   ;)

regards Oliver

Outcomes