spring-projects/spring-integration — pull request #1163 by garyrussell (2014-05-20 22:21:10+00:00)
Title: INT-3386 Improve Aggregator Performance

JIRA: https://jira.spring.io/browse/INT-3386

Eliminate unnecessary group copy during retrieval in the
aggregator. This is expensive with large groups.

Ensure that the reaper uses a snapshot of the group at the
time it is considered for reaping.

AggregatorTests.testAggPerf() - before:

AggregatorTests [main] : Sent 0 in 0.0 (10k in 0ms)
AggregatorTests [main] : Sent 10000 in 4.872 (10k in 4872ms)
AggregatorTests [main] : Sent 20000 in 16.86 (10k in 11988ms)
AggregatorTests [main] : Sent 30000 in 36.809 (10k in 19949ms)
AggregatorTests [main] : Sent 40000 in 65.045 (10k in 28236ms)
AggregatorTests [main] : Sent 50000 in 100.329 (10k in 35284ms)
AggregatorTests [main] : Received 60000
AggregatorTests [main] : Sent 60000 in 143.106 (10k in 42777ms)
AggregatorTests [main] : Sent 70000 in 147.027 (10k in 3921ms)
AggregatorTests [main] : Sent 80000 in 158.664 (10k in 11637ms)
AggregatorTests [main] : Sent 90000 in 177.956 (10k in 19292ms)
AggregatorTests [main] : Sent 100000 in 205.045 (10k in 27089ms)
AggregatorTests [main] : Sent 110000 in 240.005 (10k in 34960ms)
AggregatorTests [main] : Received 60000
AggregatorTests [main] : Sent 120000 in 282.566 (10k in 42561ms)

After:

AggregatorTests [main] : Sent 0 in 0.0 (10k in 0ms)
AggregatorTests [main] : Sent 10000 in 0.612 (10k in 612ms)
AggregatorTests [main] : Sent 20000 in 0.925 (10k in 313ms)
AggregatorTests [main] : Sent 30000 in 1.131 (10k in 206ms)
AggregatorTests [main] : Sent 40000 in 1.288 (10k in 157ms)
AggregatorTests [main] : Sent 50000 in 1.361 (10k in 73ms)
AggregatorTests [main] : Received 60000
AggregatorTests [main] : Sent 60000 in 1.522 (10k in 161ms)
AggregatorTests [main] : Sent 70000 in 1.619 (10k in 97ms)
AggregatorTests [main] : Sent 80000 in 1.696 (10k in 77ms)
AggregatorTests [main] : Sent 90000 in 1.75 (10k in 54ms)
AggregatorTests [main] : Sent 100000 in 1.81 (10k in 60ms)
AggregatorTests [main] : Sent 110000 in 1.851 (10k in 41ms)
AggregatorTests [main] : Received 60000
AggregatorTests [main] : Sent 120000 in 1.918 (10k in 67ms)