Issue #10511 has been updated by Oleg Sukhodolsky.


Koichi Sasada wrote:
> could you try r48596?

Here are results I've got.

$ ruby -v
ruby 2.2.0dev (2014-11-28 trunk 48629) [x86_64-darwin14]
$ ruby /tmp/bm.rb 
  6.660000   0.080000   6.740000 (  7.153794)
$ ruby /tmp/bm.rb 
  6.710000   0.080000   6.790000 (  7.119988)
$ rvm ruby-2.1.5 do ruby /tmp/bm.rb 
 10.230000   0.110000  10.340000 ( 10.906019)
$ rvm ruby-2.1.3 do ruby /tmp/bm.rb 
 10.130000   0.100000  10.230000 ( 10.585034)
$ rvm ruby-2.1.2 do ruby /tmp/bm.rb 
  8.210000   0.080000   8.290000 (  8.507865)

Unfortunately I was unable to try the rails app I've used because sqlite can not be built with this version :(
Will ask others to try their tests.

----------------------------------------
Bug #10511: fix for #9940 causes dramatic performance regression
https://bugs.ruby-lang.org/issues/10511#change-50165

* Author: Oleg Sukhodolsky
* Status: Feedback
* Priority: Normal
* Assignee: Koichi Sasada
* Category: core
* Target version: current: 2.2.0
* ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Originally reported against debase gem (https://github.com/denofevil/debase/issues/16)
After fix for #9940 running anything under debugger became about 4 times slower.
I've verified that we I revert the fix performance is restored.
To reproduce you could get https://github.com/railstutorial/sample_app_rails_4 and run rspec rake task under debugger (I've used RubyMine for this because debase is used as 
debugger's backend there)
Performance with 2.1.2 it takes about 20 seconds on my laptop, with 2.1.3 - almost 80 seconds :(
The same problem is observable with 2.1.4 and 2.1.5 too.




-- 
https://bugs.ruby-lang.org/