Glossary
PrebuiltLoader
dyld's data structure for a dylib in the shared cache. All dependency resolution and fixup info is pre-computed at cache build time; per-process loading is O(1).
A PrebuiltLoader is dyld's data structure for a dylib that lives in the shared cache. It holds the dylib's metadata in a pre-computed form so per-process loading is essentially O(1) — no parsing of load commands, no walking of dependency graphs, no fixup computation.
Built at cache build time by the offline cache builder, which:
- Resolves every cross-dylib symbol.
- Computes the dependency closure.
- Encodes all of this into a fixed binary layout the loader can use directly.
Counterpart: JustInTimeLoader for dylibs not in the cache (your main binary, third-party frameworks). Those have to be parsed and linked at load time.
The PrebuiltLoader vs JustInTimeLoader split is why an app launches dramatically faster when its dependencies are mostly in the cache. Heavy use of third-party Swift packages (each outside the cache) measurably slows startup.
See also: dyld, dyld shared cache, and the dyld in depth article.