
Issue #19911 has been updated by ashwinsurya14 (Ashwin Surya Kumar Sivasubramanian). On further debugging we found that the following is speeding up the require and file read operation time ruby --disable-gems -e 'require "json"' 05:13:22 PM user=0.04s system=0.01s cpu=99% total=0.051 ---------------------------------------- Bug #19911: require slower with ruby/3.2.2 https://bugs.ruby-lang.org/issues/19911#change-104823 * Author: ashwinsurya14 (Ashwin Surya Kumar Sivasubramanian) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- we tested require with ruby 3.2.2 and ruby 2.7.2 and its seems to slowdown considerabily the test case: Ruby 3.2.2 command: time ruby -e 'require "json"' time: user=0.19s system=0.02s cpu=99% total=0.204 Ruby 2.7.2 command: time ruby -e 'require "json"' time: user=0.05s system=0.02s cpu=98% total=0.064 We also saw the same slowdown with File.read Not sure that is casuing the slowdown in require also On side note we saw three times more lstat on strace with the above command on ruby/3.2.2.Not sure if that is the root cause I also tested with multiple versions of ruby 2* starting with ruby/2.3.1 and it doesnt seem to have this slowdown -- https://bugs.ruby-lang.org/