perf(camera): remove redundant mkdir subprocess#540
Closed
JustYannicc wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Superseded by #556, which consolidates this AI/native media performance batch. |
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.
What changed
/bin/mkdir -psubprocess from camera capture before writing PNG bytes./bin/mkdir, preserves the capture save path shape, writes throughfsWriteBinaryFile(savePath, bytes), and verifies the main IPC writer creates parent directories recursively before writing.Why
fs-write-binary-filealready owns recursive parent directory creation withfs.promises.mkdir(path.dirname(filePath), { recursive: true })./bin/mkdir -paveraged 1.370 ms over 80 runs on the audit Mac, while in-process mkdir averaged 0.033 ms.Compatibility impact
Pictures/SuperCmd Captures/supercmd-capture-*.pngpath behavior.How tested
node --test scripts/test-camera-capture-single-encode.mjsmcp__lsp.diagnosticsonsrc/renderer/src/CameraExtension.tsxwas run; upstreammaincurrently reports the existingsetCapturePreviewClearTimerRefdiagnostic unrelated to this diff../node_modules/.bin/tsc -p tsconfig.renderer.json --noEmitwas attempted; upstreammainhas existing renderer type errors unrelated to this diff.git diff --check origin/main..HEADStack validation
origin/main(9bdd3d2) and contains only this camera mkdir fix commit (352b8ed).52288a0, then reapplied to this clean upstream-main PR branch.