perf: run yt-dlp from a zipapp on a portable Python
Replaces the official yt-dlp_macos sidecar. That build is PyInstaller one-file and unpacks 37MB on every invocation, costing ~8s per call on this machine — ruled out signing, xattrs and thinning the universal binary as causes, and it is 8% CPU over 8s, so it is the unpack itself. Every stream resolve paid it. The 3MB zipapp on a trimmed portable CPython starts in ~0.45s, a 17x improvement; a real stream resolve goes from ~10s to ~2.4s. macOS ships only Python 3.9 and yt-dlp needs 3.10+, hence bundling an interpreter. yt-dlp is now resolved as an argv prefix rather than a path, so a system install (a plain script, instant) still takes precedence. Bundle grows 153MB -> 219MB, which buys back the responsiveness.
This commit is contained in:
+3
-1
@@ -28,5 +28,7 @@ dist-ssr
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# Bundled helper binaries — ~140MB, fetched by scripts/fetch-binaries.sh
|
||||
# Bundled helper tools — ~130MB, fetched by scripts/fetch-binaries.sh
|
||||
src-tauri/binaries/
|
||||
src-tauri/resources/python/
|
||||
src-tauri/resources/yt-dlp.pyz
|
||||
|
||||
Reference in New Issue
Block a user