Skip to content

Avoid temporary pipeline snapshots during packet injection - #24

Merged
GrowlyX merged 1 commit into
masterfrom
perf/pipeline-context-links
Nov 7, 2026
Merged

GrowlyX merged 1 commit into
masterfrom
perf/pipeline-context-links

Conversation

@GrowlyX

@GrowlyX GrowlyX commented Nov 7, 2026 •

Copy link
Copy Markdown

Serverbound packet injection repeatedly snapshots pipeline handler names to find the preceding context. The latest legacy-fluid allocation profile (zslMZQSIBG) attributes about 2.24 MiB/s of array copying to this stack.

Use an optional method handle to Netty's volatile predecessor link, rereading it on each call and validating target/predecessor membership. Preserve the public name-snapshot fallback for unavailable private access, unsupported contexts and failed validation. No contexts or pipeline topology are cached.

Validation: common tests pass with Netty 4.0.20, 4.1.118 and Blueprint's 4.2.9 runtime; all 122 default common/Bukkit tests and the universal jar build pass. Regression coverage includes randomized add/remove/replace operations, missing/null/case-sensitive names, first-handler/internal-tail boundaries, removal during lookup, wrapped contexts and forced fallback.

The warmed, alternating-order fixture reports zero temporary allocation on the guarded link path. In local JDK25/aarch64 Netty4.2.9 last-handler fixtures, names/link timings are 42.5/36.0 ns (8 handlers), 76.7/66.3 ns (16) and 180.2/155.6 ns (32). Reproduction and limitations are in docs/performance/pipeline-predecessor-lookup.md. This is fixture evidence, not a measured production improvement; no live rollout included.

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found.

Summary

Replaces repeated pipeline-name snapshots with an optional read of Netty’s volatile predecessor link.

  • Server-side packet injection finds its predecessor through a live pipeline link when available.

Reviews (1) · Last reviewed commit: "Avoid pipeline name snapshots for suppor..." · Reviewed by Greptile

@GrowlyX
GrowlyX force-pushed the perf/pipeline-context-links branch from f18cfa2 to 81b96c8 Compare November 7, 2026 20:58
@GrowlyX
GrowlyX merged commit 39f269a into master Nov 7, 2026
2 checks passed
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.

1 participant