From: Yusuke ENDOH Date: 2011-05-31T09:23:11+09:00 Subject: [ruby-core:36602] Re: [Ruby 1.9 - Bug #3924] Performance bug (in require?) Hello, 2011/5/31 Xavier Shay : >>> rb_ary_push( rb_gv_get( "$LOADED_FEATURES" ), require_name ); >> > It seems that amalgalite is the only extension to do this in that search. > While I realise that doesn't cover everything, it seems the impact is > perhaps small? Would it be possible to instead work with the maintainer to > fix, and publicize this change. It seems and odd API to be supporting. I don't think so. When I try to add a path into $LOADED_FEATUES by extension library, rb_ary_push is the first way that came to mind. 2011/5/31 Xavier Shay : > 1.8 actually does exhibit the same performance curve, just over a greater > value of N. See this graph (x-axis doubled from other benchmarks) Hmm... Okay. However, it is hard to fix this issue in 1.9.x, I think. To be honestly, $LOADED_FEATURES as an array is uncool, or even considered as a "specification bug", though. >> I tried your patch and test in https://gist.github.com/985224 >> on Ubuntu. >> I could confirm that trunk is twice slower than 1.9.2p180. >> But I couldn't confirm that the speed up by your patch. >> I also performed the same benchmark after "gem install rails", >> but there is no difference. > > In that case perhaps it is related to the CASEFOLD_FILESYSTEM? I have been > benchmarking on OSX. I see! > A related change was reverted recently in r31692. Then, is there no problem in os x now? -- Yusuke Endoh