なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2021/07/17)

2021/07/17分のコミットです。

CHANGELOGへの追加はありませんでした。


Fix performance slowdown in Ruby 2.7+

activesupport/lib/active_support/core_ext/object/try.rbの修正です。

trytry!メソッドの最初の引数(method_name)を切り出だすようにしていたのを、切り出さないよう修正しています。

23% faster Nil#tryで高速化の為に行った対応だったのですが、Ruby 2.7+では元のコードが速くなっている為。

参考: 「@schneems @jamie_gaskins The approach in that PR is significantly faster in Ruby 2.5, but slower in Ruby 2.6, 2.7, and 3.0 from my testing https://t.co/RJZUSlTX86」 / Twitter


Add an option threshold: to .parallel() setup method (#42789)

Active Supportの修正です。

Parallelize tests only when there are enough to justify the parallelization overheadで追加したparallel testsのthresholdを、test caseでも設定出来るよう修正しています。

class ActiveSupport::TestCase
  parallelize threshold: 100
end