Skip to content

ARTEMIS-6144 Improve getPagedResult#6563

Open
GChuf wants to merge 5 commits into
apache:mainfrom
GChuf:ARTEMIS-6144
Open

ARTEMIS-6144 Improve getPagedResult#6563
GChuf wants to merge 5 commits into
apache:mainfrom
GChuf:ARTEMIS-6144

Conversation

@GChuf

@GChuf GChuf commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Benchmarks below:

Benchmark addressCount Throughput (main) Throughput (6144) Δ Throughput Alloc (main, B/op) Alloc (6144, B/op) Δ Alloc
testAllResults 1000 1,127.29 ops/s 3,583.19 ops/s +217.9% 37,502.19 47,313.95 +26.2%
testAllResults 10000 82.95 ops/s 219.52 ops/s +164.6% 449,604.60 460,263.58 +2.4%
testFirstPage 1000 1,126.65 ops/s 3,661.16 ops/s +225.0% 22,958.20 47,289.91 +106.0%
testFirstPage 10000 80.90 ops/s 229.92 ops/s +184.2% 280,597.19 460,238.15 +64.0%
testMiddlePage 1000 1,127.60 ops/s 3,591.73 ops/s +218.5% 23,422.20 47,529.95 +102.9%
testMiddlePage 10000 81.81 ops/s 219.18 ops/s +167.9% 281,651.85 460,479.60 +63.5%

@GChuf GChuf marked this pull request as draft July 6, 2026 13:19
@GChuf GChuf marked this pull request as ready for review July 7, 2026 12:04
@GChuf

GChuf commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Ready for review.
After a bunch of sanity checks:
The JMH tests show a positive improvement in speed, a bit higher memory usage though - but the mem usage is small.
JProfiler shows reduction in relative cpu usage from 20-25% to about 6-10%.
The majority of the benefits, and all the extra mem usage come from fieldCache = new IdentityHashMap<>(array.length). Otherwise I was getting better memory numbers before I added the IdentityHashMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants