Repository navigation
Write derivation JSON directly into the output buffer - #626
Draft
ConnorBaker wants to merge 1 commit into
Draft
ConnorBaker wants to merge 1 commit into
ConnorBaker wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Collaborator
Author
|
@coderabbitai review |
Action not completed
|
ConnorBaker
added a commit
to ConnorBaker/iets
that referenced
this pull request
Nov 22, 2026
ConnorBaker
added a commit
to ConnorBaker/iets
that referenced
this pull request
Nov 22, 2026
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.
The classic
nix derivation showrenderer already has a destination byte vector. Serialize object keys and scalar or empty values directly into it withserde_json::to_writer. This removes a temporary vector and a copy each time the renderer emits one of those values. The existing float and indentation code still controls their spelling and layout. This PR targets main directly and has no PR prerequisites.Validation
The ordinary Nix package built on AArch64. The project's Nix formatting and AST checks passed, as did all six selected derivation-display unit tests. The release CLI matched C++ Nix 2.36.0pre20261121 byte for byte across eight combinations covering single and recursive output, compact and pretty formatting, escaped keys and values, structured attributes, and a pinned Nixpkgs
hello.src. Classic fallback was disabled.Native AArch64 measurements
Fresh CLI processes pinned to the same CPU ran each workload in all six orders of stock, candidate, and an identical stock repeat. These are geometric means of paired changes in retired user instructions for the entire command. Each measurement checked stdout against the complete C++ Nix document.
hello.src, recursive compacthello.src, recursive prettyhello.src, single compactThe one-minute host load ranged from 5.47 to 6.81. The 72 measured processes had zero major faults. Same-binary instruction differences stayed within 0.005%. A separate Callgrind run on the structured graph recorded 14,174 calls to
mi_malloc_alignedon stock and 11,281 after the change. The scope of these results is derivation display.AI assistance
OpenAI Codex assisted with implementation, review, validation, and preparation of this pull request.