imbajin commented on PR #826: URL: https://github.com/apache/hugegraph-toolchain/pull/826#issuecomment-6275201834
### Follow-up: pnpm reuse for AI worktrees A local experiment suggests that pnpm's optional global virtual store is worth evaluating for developers who create many worktrees. This PR does **not** enable it or introduce Bun. With Node 24.22.0 / pnpm 12.14.0 on macOS/APFS, the same frozen dependencies and G6 patch were installed offline into isolated fresh directories. The package cache was already populated. | A new checkout joining an already prepared dependency graph | Default project virtual store | Experimental global virtual store | | --- | ---: | ---: | | Observed installation time | 4.15 s | 0.26 s | | Regular files inside that checkout's `node_modules` | 55,893 | 46 | | Logical contents of that directory, excluding the shared store | 462 MB | 0.56 MB | These are **single observations, not benchmark medians or a general speedup claim**. Initial global-store materialization took 10.32 s; the warm-checkout result does not represent a cold install. APFS clones can already share physical data, so the logical directory figures do not establish reclaimed physical GB. For the two global-store checkouts, all 62 direct dependencies resolved to the same package paths and manifest inodes. Dependency versions/content and the nine affected G6 patch files matched across the tested layouts. The existing checkout's roughly 918 MB logical `node_modules` also includes about 309 MB of generated `.cache`, 60 MB of Vite cache and 91 MB of older G6 contexts. Those are separate from the clean dependency tree and must not be presented as the default cost of every new checkout. **Follow-up gates:** verify the normal Maven frontend builder, direct Node/ESM, Jest/Vite, native dependencies and different lock/patch contexts before recommending an opt-in setup. In particular, the shared builder sets `CI=true`, which needs an actual compatibility check against the global layout. Keep dependency caches and mutable per-branch outputs separate. References: [pnpm global virtual store](https://pnpm.io/global-virtual-store), [package import and layout settings](https://pnpm.io/settings/node-modules). The feature remains experimental; no default configuration or global user setting was changed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
