mesa loads your repository lazily rather than waiting for a full download. It materializes
files as you use them, fetching only what you’re likely to need.
Layout BFS Prefetching
Breadth-first layout prefetching works by downloading the listing of each directory, one layer lower than your current directory. As you visit/foo, we try to fetch the listing of /foo/bar and /foo/baz, but not /foo/bar/qux.
Content BFS Prefetching
This mode is currently in development and is not released. If you need it soon, do not hesitate to reach out to us.
mesa supports prefetching the file content. Similarly to layout BFS
prefetching, we prefetch files one-layer ahead of your current activity.
Configuration
Prefetch behavior can be tuned with environment variables:How MESA_PREFETCH_MAX_DEPTH shapes the cache
mesa prefetches breadth-first, one layer ahead of where you are, and MESA_PREFETCH_MAX_DEPTH
bounds how far ahead that walk runs from each directory you visit. Consider this repo:
MESA_PREFETCH_MAX_DEPTH=1, visiting /core prefetches one level — the listings of
core/consciousness and core/decision-engine — but stops there. Nothing under
core/consciousness/threat-models is fetched until you actually look up
/core/consciousness, at which point its children are prefetched one level deeper. Leaving
MESA_PREFETCH_MAX_DEPTH unset instead walks the entire subtree under each directory you
visit, fetching everything ahead of you until MESA_PREFETCH_CACHE_PRESSURE_LIMIT backs it off.
