aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2015-07-24 22:47:34 -0500
committerschneems <richard.schneeman@gmail.com>2015-07-29 20:41:57 -0500
commit097ec6fb7c7e1854cdd96113213b555ae7415953 (patch)
tree22e75ef77f95adfa1c6f80e05aaa80834c692143 /railties/lib
parent9b8258814e695fe7fbb728456498fd0fd8709f5c (diff)
downloadrails-097ec6fb7c7e1854cdd96113213b555ae7415953.tar.gz
rails-097ec6fb7c7e1854cdd96113213b555ae7415953.tar.bz2
rails-097ec6fb7c7e1854cdd96113213b555ae7415953.zip
Speed up journey missing_keys
Most routes have a `route.path.requirements[key]` of `/[-_.a-zA-Z0-9]+\/[-_.a-zA-Z0-9]+/` yet every time this method is called a new regex is generated on the fly with `/\A#{DEFAULT_INPUT}\Z/`. OBJECT ALLOCATIONS BLERG! This change uses a special module that implements `===` so it can be used in a case statement to pull out the default input. When this happens, we use a pre-generated regex. This change buys us 1,643,465 bytes of memory and 7,990 fewer objects per request.
Diffstat (limited to 'railties/lib')
0 files changed, 0 insertions, 0 deletions