Feature #6019

Revision r34582 significantly slows down rails app

Added by Yura Sokolov about 2 years ago. Updated about 1 year ago.

[ruby-core:42606]
Status:Closed
Priority:Normal
Assignee:Akinori MUSHA
Category:core
Target version:-

Description

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? ?

History

#1 Updated by Yura Sokolov about 2 years ago

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

#2 Updated by Yui NARUSE about 2 years ago

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

#3 Updated by Yura Sokolov about 2 years ago

Rails already include fix against this issue into its trunk: https://github.com/rails/rails/pull/5039

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 1 year ago

  • Tracker changed from Bug to Feature

#5 Updated by Akinori MUSHA about 1 year 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