Bootsnap: Optimizing Ruby App Boot Time - Shopify
May 18, 2017

Summary
This post introduces Bootsnap, a public gem that wraps several optimizations to speed up Ruby application boot times. It details two main categories of optimizations: Path Pre-Scanning (modifying `Kernel#require` and `ActiveSupport` autoloads to eliminate `$LOAD_PATH` scans) and Compilation Caching (caching Ruby bytecode compilation results and YAML loading into MessagePack format). It explains the mechanisms behind these optimizations, including cache invalidation strategies and the use of extended file attributes for storing compiled bytecode. The post also presents results showing significant boot time reductions for various applications.