Repository navigation
perf(desktop): strip local symbols from the bundled macOS ONNX Runtime - #2765
Open
richiemcilroy wants to merge 1 commit into
Open
richiemcilroy wants to merge 1 commit into
richiemcilroy wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Contents/Resources/onnxruntime/lib/libonnxruntime.dylibis Microsoft's release dylib, 35.2 MB, used on macOS by Parakeet transcription and as the camera-blur fallback when Apple Vision is unavailable. About 12.5 MB of it is local symbol tables that nothing in Cap reads.setup.jsnow runsstrip -xon it before re-signing (it already re-signs the dylib with Cap's identity for notarization). The cache marker changes with the preparation, so a cached unstripped copy is prepared again.Evidence
Measured on the 0.6.1 release bundle's dylib (arm64, ONNX Runtime 1.24.2):
strip -xnm -gU)OrtGetApiBase)-xremoves local symbols only. The exported C API thatortresolves at load time is untouched.CI (
build-gpui, both macOS runners) gains "Test the prepared ONNX Runtime":OrtGetApiBaseis still exported from the dylib setup.js prepared;segmentation::tests::inference_runs_from_a_caller_with_a_tiny_stack, which loads the runtime and runs the bundled selfie-segmentation model three times.scripts/setup.jsis added to thegpuipath filter so this runs whenever setup changes.The FFmpeg dylibs in
Spacedrive.frameworkwere checked the same way; they are already stripped (strip -xsaves 0 bytes).Saves
~12.5 MB installed on Apple Silicon (the Intel 1.23.2 dylib is stripped by the same step). The updater archive and DMG shrink by the compressed size of those symbol tables.