mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 11:48:06 +01:00
Enable YJIT when available (#30310)
This commit is contained in:
parent
283a891e92
commit
1b6eb2c7f0
1 changed files with 13 additions and 0 deletions
13
config/initializers/enable_yjit.rb
Normal file
13
config/initializers/enable_yjit.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Automatically enable YJIT as of Ruby 3.3, as it brings very
|
||||
# sizeable performance improvements.
|
||||
|
||||
# If you are deploying to a memory constrained environment
|
||||
# you may want to delete this file, but otherwise it's free
|
||||
# performance.
|
||||
if defined?(RubyVM::YJIT.enable)
|
||||
Rails.application.config.after_initialize do
|
||||
RubyVM::YJIT.enable
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue