Repository navigation
perf: measure memory usage on large inputs - #123
Merged
Merged
Conversation
Add a devkit-xdr example that decodes large base64 ScVal inputs and reports peak/current memory per input size using platform APIs (Linux /proc/self/status, Windows GetProcessMemoryInfo) with a documented fallback. Document methodology and limits in docs/MEMORY.md. Closes #109
…arge-inputs # Conflicts: # CHANGELOG.md
…arge-inputs # Conflicts: # CHANGELOG.md # README.md
Ayinkx01
approved these changes
Sep 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.
Closes #109
What
Measures memory on large decode inputs and reports it per input size.
crates/devkit-xdr/examples/mem_profile.rs: decodes large base64ScVal::Bytesinputs at several sizes and prints CSV (size_bytes, base64_bytes, decoded_json_bytes, current_bytes, peak_bytes, delta_current_bytes)./proc/self/status(VmRSS/VmHWM) and WindowsGetProcessMemoryInfo(WorkingSetSize/PeakWorkingSetSize). Other platforms fall back ton/awith a clear note, so the example still builds and runs.docs/MEMORY.md: methodology, platform table, and documented limits.Verification
cargo run -p devkit-xdr --example mem_profile -- 1024,262144,1048576reports memory per size; observed peak grew 5.08 MB -> 6.34 MB -> 10.33 MB.cargo fmt --all -- --checkcleancargo clippy --all-targets --all-features -- -D warningscleancargo test --all --all-featurespass