During performance tests on a hardware with 12 cores, we found a contention in MyBatis.
The following code snippet from ExecutionEntity.remove() shows two Queries which are created dynamically for each process instance.
We found this dynamic creation (which leads always to the same SQL statements) to be a severe performance bottleneck in our tests (see also http://forums.activiti.org/en/viewtopic.php?f=6&t=1523&#p6386 for a similar observation).
We added two new static queries which just select the Tasks resp. Jobs for the ExecutionEntity and gained a performance boost (throughput) of up to 100%.
As an example the new static query for Jobs which we used instead of the original dynamic query (selectJobByQueryCriteria):
We could provide an according patch if needed.