SYSTEM Cited by 1 source
Sapling Virtual File System¶
Sapling's virtual file system is the working-copy-scale primitive that pairs with the history-scale primitive (Segmented Changelog) on top of the Sapling-compatible server. As of the 2022-11-15 announcement post, it is not yet open-sourced — the post says "we hope to open-source the Sapling-compatible virtual file system" in the future.
What it does¶
"We've developed a virtual file system (not yet publicly available) that makes it look and act as if you have the entire repository. Clones and checkouts become very fast, and while accessing a file for the first time requires a network request, subsequent accesses are fast and prefetching mechanisms can warm the cache for your project."
— Sapling announcement post
Concretely: present the full repo shape to the user / tools, but only fetch file contents on first access. Cache locally after that. Prefetch per-project to warm the cache proactively. This is the canonical VFS-for-monorepo pattern — cousin of Microsoft's GVFS (Git Virtual File System, 2017) and Meta's EdenFS.
Without the VFS¶
Even in Sapling deployments without the VFS, two optimizations keep working-copy operations tractable:
- Watchman-backed
sl status— incremental file-change queries via OS file-system notifications rather than full-tree scans. - Sparse checkouts — the user materializes only a declared subset of the repo on disk.
Open-source state¶
Not yet open-sourced as of 2022-11-15. Post-quote: "In the future, we aim to open-source the Sapling-compatible virtual file system, which enables working with arbitrarily large working copies and making checkouts fast, no matter how many files have changed."
Seen in¶
- sources/2024-09-10-meta-sapling-source-control-thats-user-friendly-and-scalable — the canonical-first wiki reference. Flagged as the working-copy scaling primitive; flagged as not-yet-open-source.
Related¶
- systems/sapling-scm — the parent VCS.
- systems/watchman — the lighter-weight alternative for the same "don't scan the whole tree" problem.
- concepts/virtual-filesystem-for-monorepo — the canonical concept (spans Sapling VFS / GVFS / EdenFS).
- concepts/sparse-checkout — the alternative scaling mechanism when the VFS is unavailable.