Repository navigation
Benchmark packet-field allocation and off-path CPU - #25
Merged
Merged
Conversation
[Low impact] The changes affect a local benchmark and packet-field tests, not production packet handling. The PR appears safe to merge, with a non-blocking gap in the benchmark's overlapping-copy coverage. Findings
SummaryAdds a standalone packet-field benchmark and regression tests without changing production packet code.
Reviews (1) · Last reviewed commit: "test: benchmark packet-field allocation ..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Field-storage changes can reduce allocations or speed repeated protocol stages while slowing packets that only decode once. The latest experiments reproduced that tradeoff, including JIT inlining changes that a replay-only fixture missed.
Add a standalone allocation/CPU benchmark covering empty and wrong capacity hints, full and partial replays, 4,096-field growth, overlapping rewinds and raw-input-only decoding. Compare identical fixture bytecode against baseline production classes in separate JVMs and print the actual loaded wrapper location. Add regression coverage for subclass read overrides, zero-hint late writes, buffer passthrough and mismatch consumption.
No production packet implementation changes. The performance guide includes a small archived, unapplied full-ring experiment and its complete fork data to reproduce why it was rejected: replay improved, but raw decoding regressed. Allocation stayed unchanged.
Validation: all 119 default common/Bukkit tests and the universal jar build pass; all 110 common tests also pass with Netty4.2.9. The benchmark Gradle task runs with JDK25 against baseline classes and JDK21 against current classes. The archived patch applies cleanly to the unchanged packet implementation. These are local fixtures, with no live deployment or production-gain claim.