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
[rush] Up-to-date install still regenerates and rewrites every project's shrinkwrap-deps.json (~17 s per rush install/start)聽#6129
Summary: after every install, including one that reports "Installation is already up-to-date", WorkspaceInstallManager.postInstallAsync regenerates and rewrites every project's .rush/temp/shrinkwrap-deps.json. The same path runs from rush start's alwaysInstall check (doBasicInstallAsync). In a large monorepo this costs ~17 s per command for no change.
Repro (large repo, ~1,800 projects):
rush install (completes).
rush install again: Rush reports the install is already up-to-date.
Observe that every <project>/.rush/temp/shrinkwrap-deps.json was rewritten (mtime updated), and the command took ~21 s.
Skip the shrinkwrap-deps regeneration when the install itself was skipped
3.9 s
0
A CPU profile attributes ~10.8 s of CPU to updateProjectShrinkwrapAsync plus ~10 s of I/O wait.
Expected: an up-to-date install (and rush start's alwaysInstall check when nothing changed) does not regenerate or rewrite unchanged shrinkwrap-deps.json files.
Suggested fix (either or both):
Skip the per-project shrinkwrap-deps regeneration in postInstallAsync when the install was skipped as up-to-date.
Save with onlyIfChanged: true, so unchanged files are not rewritten (which also avoids invalidating downstream watchers and output timestamps).
Plugins cannot opt out of postInstallAsync, so there is no workaround short of patching rush-lib. Happy to test a candidate fix.
Activity