Revert Blackbird default; align Jackson to 2.21#21
Merged
Conversation
…ackson 2.21 The Blackbird default registered in #20 was benched against Jackson 2.17.2, where it showed a ~2x deserialize win. moderne-cli (the primary consumer) and most current openrewrite components have moved to Jackson 2.21, where Blackbird no longer wins on deserialize and *regresses* serialize by ~70% on the real-trace JMH bench (vanilla 317±19 µs vs Blackbird 540±31 µs on a 303 KB GetObject payload — non-overlapping CIs). End-to-end this manifests as visibly slower `mod run` in production after 1.0.8 shipped: BatchVisit p50/p99 times rose 4-12x / 4-65x compared to the 1.0.7 baseline on the JS Applications working set. While here, bump jackson-module-parameter-names from 2.17.2 to 2.21.1 to match what consumers force via their version-alignment rules; this keeps the BOM resolution stable and avoids accidental version skew at runtime. The streaming TokenBuffer-based deserialize from #18 stays — that's the deserialize-side win Blackbird was attempting to chase, already shipped.
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.
Summary
BlackbirdModuledefault registration shipped in Register Blackbird module by default in JsonMessageFormatter #20 (jsonrpc 1.0.8).jackson-module-parameter-namesfrom 2.17.2 to 2.21.1 to align with the Jackson version consumers (moderne-cli, recent openrewrite/rewrite) force via their build conventions.Why revert Blackbird
The original PR's bench was on Jackson 2.17.2 —
RealTraceBench(replaying a capturedmod runtrace) showed Blackbird at ~2x faster deserialize and ~1.5x serialize. Re-running the same bench against Jackson 2.21.x tells a different story:serialize_maxdeserialize_maxThe serialize regression is real (tight error bars, no CI overlap). End-to-end on
mod run org.openrewrite.node.migrate.upgrade-node-24against the JS Applications working set, BatchVisit p50/p99 went up 4-12x / 4-65x against the pre-Blackbird baseline.We don't yet have a clean answer for why Blackbird 2.21.x regresses serialize while 2.17.2 didn't — Jackson 2.21 likely shifted the reflective-vs-generated-accessor balance — but the data is unambiguous: shipping Blackbird as a default in this Jackson lineage is a net loss for the primary consumer.
Why bump parameter-names
moderne-cliand recentopenrewrite/rewriteforce allcom.fasterxml.jackson*to 2.21.1 via dependency resolution rules. Pinningjackson-module-parameter-namesto 2.17.2 in jsonrpc resolves to the forced 2.21.1 anyway in those consumers, but locally and in any consumer that doesn't force, the 2.17.2 / 2.21.1 mix is the slightly-skewed combo that may explain some of the Blackbird-regression weirdness above. Aligning the pin to 2.21.1 keeps BOM resolution stable.What stays
TokenBuffer-based deserialize introduced in Streaming RawJson deserialize + hot-path cleanups (1.15-1.60x round-trip) #18 stays — that was the deserialize-side win Blackbird was attempting to chase, already shipped.Test plan
./gradlew test)mod run upgrade-node-24against the JS Applications working set with this version and confirm BatchVisit p50/p99 return to the pre-1.0.8 baseline