Location: crates/mds-cli/src/output.rs:495
What: format!("{report:?}") materializes the entire rendered frame into a String, then sanitize_control_chars allocates a second full copy. This is two full-frame allocations for one I/O operation.
Why deferred: Works correctly as-is; the change is a performance optimization not a bug fix. Lower priority than the security hardening.
Source review: .devflow/docs/reviews/fix-esc-injection-176/2026-07-25_1625 (rust-11, suggestion with 68% confidence)
Acceptance Criteria:
Note: Only worth the implementation effort if large directory-mode lint runs show up in profiles. The current form is clearly correct and easily testable. See T-10 test strategy for coverage requirements.
Location: crates/mds-cli/src/output.rs:495
What:
format!("{report:?}")materializes the entire rendered frame into a String, thensanitize_control_charsallocates a second full copy. This is two full-frame allocations for one I/O operation.Why deferred: Works correctly as-is; the change is a performance optimization not a bug fix. Lower priority than the security hardening.
Source review: .devflow/docs/reviews/fix-esc-injection-176/2026-07-25_1625 (rust-11, suggestion with 68% confidence)
Acceptance Criteria:
fmt::Writeadapter for miette renderingNote: Only worth the implementation effort if large directory-mode lint runs show up in profiles. The current form is clearly correct and easily testable. See T-10 test strategy for coverage requirements.