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
5
5
EXPOSE 8080
6
6
WORKDIR /rails
7
7
8
- ENV RUBY_YJIT_ENABLE=1
8
+ # ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb
9
9
10
10
# Use Jemalloc
11
11
RUN 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
5
5
EXPOSE 8080
6
6
WORKDIR /rails
7
7
8
- ENV RUBY_YJIT_ENABLE=1
8
+ # ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb
9
+
9
10
# Use Jemalloc
10
11
RUN apt-get update && \
11
12
apt-get install -y --no-install-recommends libjemalloc2
You can’t perform that action at this time.
0 commit comments