Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Ruby
  3. bootsnap

bootsnap

MITRubyv1.24.4

A Ruby library that speeds up application boot time by caching expensive computations like path lookups and code compilation.

GitHubGitHub
2.7k stars207 forks0 contributors

What is bootsnap?

Bootsnap is a Ruby gem that optimizes application boot time by caching expensive computations like filesystem path lookups and code compilation. It plugs into Ruby's `require` and `load` mechanisms to eliminate redundant work, reducing boot times by up to 75% for large Rails applications.

Target Audience

Ruby and Rails developers working on large monolithic applications with slow boot times, particularly in development and production environments where rapid restart is valuable.

Value Proposition

Developers choose Bootsnap because it provides significant boot time reductions with minimal configuration, works alongside existing tools like Spring, and is production-safe with no application code changes required.

Overview

Boot large Ruby/Rails apps faster

Use Cases

Best For

  • Speeding up development feedback loops in large Rails monoliths
  • Reducing CI/CD pipeline times by caching boot operations
  • Optimizing production application boot times for faster scaling
  • Improving performance of applications with large $LOAD_PATH directories
  • Caching YAML and JSON configuration file loads
  • Eliminating redundant filesystem scans during Ruby require calls

Not Ideal For

  • Applications deployed on read-only filesystems or containers without writable cache directories
  • Projects using alternative Ruby engines like JRuby or Rubinius where Bootsnap's optimizations are limited
  • Small applications with already fast boot times where the overhead isn't justified

Pros & Cons

Pros

Dramatic Boot Acceleration

Bootsnap reduces boot times by up to 75% for large apps like Shopify's monolith, as shown in README benchmarks, by caching path lookups and compilation.

Easy Rails Integration

It's a drop-in gem that requires only adding 'require bootsnap/setup' to config/boot.rb, with no application code changes needed.

Environment Flexibility

Works safely in development, test, and production environments with configurable cache behavior, as noted in the Environments section.

Instrumentation for Debugging

Provides callbacks to monitor cache hits, misses, and stale entries, helping identify performance bottlenecks during setup.

Cons

Cache Maintenance Burden

Bootsnap never cleans up its own cache, requiring manual purging of tmp/cache/bootsnap* to avoid progressive slowdowns, as warned in the README.

Filesystem Dependency

Performance degrades on non-local or slow filesystems, and boot failures occur if the cache directory isn't writable, limiting deployment options.

Compatibility Issues

It has known problems in QEMU environments causing hangs, requiring workarounds like disabling parallelization, and limited support for non-MRI Rubies.

Frequently Asked Questions

Quick Stats

Stars2,738
Forks207
Contributors0
Open Issues4
Last commit26 days ago
CreatedSince 2017

Tags

#rails#development-tool#caching#gem#ruby#performance

Built With

R
Ruby

Included in

Ruby14.1k
Auto-fetched 16 hours ago

Related Projects

yajl-rubyyajl-ruby

A streaming JSON parsing and encoding library for Ruby (C bindings to yajl)

Stars1,489
Forks178
Last commit6 months ago
fast_blankfast_blank

fast_blank is a Ruby C extension that delivers a high-performance alternative to Active Support's `String#blank?` method. It offers significant speed improvements while maintaining compatibility with Ruby's standard behavior for determining if a string is empty or contains only whitespace. ## Key Features - **Performance Optimized** — Provides 1.2–20x faster execution compared to Active Support's implementation, depending on string length. - **Zero String Allocation** — Operates without allocating additional strings, reducing garbage collection overhead. - **Full Compatibility** — Includes `blank_as?` method for 100% compatibility with Active Support's Unicode-aware `blank?` behavior. - **MRI & Rubinius Support** — Compatible with MRI Ruby 1.9.3 through 2.2 and Rubinius 2.x. ## Philosophy fast_blank prioritizes raw performance and minimal memory overhead while maintaining behavioral parity with Ruby's native string handling, making it an ideal drop-in replacement for performance-critical applications.

Stars616
Forks36
Last commit2 years ago
fast_countfast_count

Quickly get a count estimation for large tables (>99% of accuracy for PostgreSQL).

Stars274
Forks6
Last commit3 months ago
pluck_in_batchespluck_in_batches

A faster alternative to the custom use of `in_batches` with `pluck`

Stars156
Forks2
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub