You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
packaging: one chmod spawn per file costs ~6.5s per package #238
package_stager.dart:65 spawns one chmod per extra file that has a mode — and expandPackageFiles assigns a mode to every swept file even when the manifest sets none (package_files.dart:133, e.mode ?? modeOf(f)).
Measured on a 2000-file asset tree:
files=2000 modes=2000
chmod invocations: 2001
200 real chmod spawns: 657 ms => 2001 spawns ≈ 6573 ms
That is ~6.5 s of pure fork/exec per package, multiplied by formats × backends: deb + ipk + rpm + tarball across 5 backends is roughly two minutes of spawning.
Fix: group destinations by mode and issue one chmod <mode> f1 f2 … per distinct mode, chunked for argv length — typically 2-3 spawns instead of thousands.
Nothing else on that path is O(n²): expandPackageFiles is a single walk, no file is hashed twice, and the per-file statSync/typeSync are unavoidable.
Activity