Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Avoid inspecting the whole route set, closes #1525

  • Loading branch information...
commit ed988eece022ae314428d153792aaa26e8749b47 1 parent 06d2d4c
@josevalim josevalim authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_dispatch/routing/route_set.rb
6 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -9,6 +9,12 @@
module ActionDispatch
module Routing
class RouteSet #:nodoc:
+ # Since the router holds references to many parts of the system
+ # like engines, controllers and the application itself, inspecting
+ # the route set can actually be really slow, therefore we default
+ # alias inspect to to_s.
+ alias inspect to_s
PARAMETERS_KEY = 'action_dispatch.request.path_parameters'
class Dispatcher #:nodoc:

8 comments on commit ed988ee


Did this make it into 3.2 and 3.1?


Yeah, it's in 3-2-stable as well. Should be in 3.2.3.rc1 by now. 419040f


@joevandyk it's only on master, but it's simple fix, so we can backport it. Unfortunately @spastorino already bumped to 3.2.3.rc, so please just reopen RouteSet if you need it, I will make sure it hits 3.2.4


@drogus I can confirm that it's already in 3.2.3.rc1


Oops, sorry I checked wrong branch :)

It's like @sikachu said, disregard my previous comment.


I think this is also a problem on 3.1, maybe even 3.0. Since it can cause applications to freeze and explode in ram usage, could it be applied to those stable branches as well?


@joevandyk that make sense. Can you cherry-pick this onto 3-1-stable and send a pull request?

I don't think we're going to do another release for 3.0.x though, as we're maintaining N and N-1 only.


no need to open pull requests :) I cherry-picked them

@joevandyk since I'm also not sure if there will be 3.1 releases, unless there are some security issues, you can use rails from git from 3-1-stable branch.

Please sign in to comment.
Something went wrong with that request. Please try again.