Skip to content

perf(sandbox): bound stderr carry to avoid O(n²) (#427) - #441

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/427-sandbox-stderr-bound
Jul 27, 2026
Merged

perf(sandbox): bound stderr carry to avoid O(n²) (#427)#441
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/427-sandbox-stderr-bound

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Incremental newline scan on each stderr chunk (no full-buffer split rebuild).
  • Carry capped at 256 KiB; overflow flushed as …[truncated] and remainder dropped until \n.
  • Sanitize input bounded in both pipe and SandboxSanitizer.

Closes #427

Test plan

  • flutter test test/core/extensions/sandbox/sandbox_sanitization_pipe_test.dart

Cap incomplete-line carry, drop overflow until the next newline, and
avoid toString+split rebuilds on every chunk. Bound sanitize input length.

Closes #427
@github-actions github-actions Bot added performance Theme parser epic label: performance core Core library logic and services labels Jul 27, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit a45e76b into dev Jul 27, 2026
4 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/427-sandbox-stderr-bound branch July 27, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core library logic and services performance Theme parser epic label: performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant