Feature #6019

Revision r34582 significantly slows down rails app

Added by Yura Sokolov about 5 years ago. Updated about 4 years ago.

Target version:


Before r34582 simple rails32 app (query sqlite and disply 20 rows of simple data)
benchmarked as 55req/second , after its performance is 33req/second.

I could agree that RubyOnRails should be in sync with ruby, but maybe there is other way
to fix respond_to? ?


#1 [ruby-core:42609] Updated by Yura Sokolov about 5 years ago

Fix were relatively easy. Close this issue, please. Excuse me for disturbing.

#2 [ruby-core:42645] Updated by Yui NARUSE about 5 years ago

  • Status changed from Open to Assigned
  • Assignee set to Akinori MUSHA

#3 [ruby-core:42669] Updated by Yura Sokolov about 5 years ago

Rails already include fix against this issue into its trunk:

Any way, could second parameter have more variants? So that:
- respond_to?(:meth) and respond_to?(:meth, nil) will test for public methods,
- respond_to?(:meth, true) will test all methods
- respond_to?(:meth, false) (or respond_to?(:meth, :with_protected)) will test for public and protected methods

It is just a suggestion and I could not prove it will be very useful.

#4 Updated by Akinori MUSHA about 4 years ago

  • Tracker changed from Bug to Feature

#5 [ruby-core:52431] Updated by Akinori MUSHA about 4 years ago

  • Status changed from Assigned to Closed
  • Target version deleted (2.0.0)

Thanks for the followup. This change was meant to be a fix for a misfeature, and it's great Rails followed it quickly.

As for a feature request, I think we need a little more consideration and details. Please submit one again when you work out a concrete specification with some confidence.

Also available in: Atom PDF