File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1+ # Automatically enable YJIT as of Ruby 3.3, as it bring very
2+ # sizeable performance improvements.
3+
4+ # If you are deploying to a memory constrained environment
5+ # you may want to delete this file, but otherwise it's free
6+ # performance.
7+ if defined? RubyVM ::YJIT . enable
8+ Rails . application . config . after_initialize do
9+ RubyVM ::YJIT . enable
10+ end
11+ end
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-se
55EXPOSE 8080
66WORKDIR /rails
77
8- ENV RUBY_YJIT_ENABLE=1
8+ # ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb
99
1010# Use Jemalloc
1111RUN apt-get update && \
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-se
55EXPOSE 8080
66WORKDIR /rails
77
8- ENV RUBY_YJIT_ENABLE=1
8+ # ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb
9+
910# Use Jemalloc
1011RUN apt-get update && \
1112 apt-get install -y --no-install-recommends libjemalloc2
You can’t perform that action at this time.
0 commit comments