From 5584ddc43da6f3275c45305f50d934e505750f8c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 6 Nov 2013 16:32:47 -0800 Subject: Stop using method missing for singleton delegation. This saved about 46 array allocations per request on an extremely simple application. The delegation happened in the notification subsystem which is a hotspot, so this should result in even more savings with larger apps. Squashed commit of the following: commit 41eef0d1479526f7de25fd4391d98e61c126d9f5 Author: Aaron Patterson Date: Wed Nov 6 16:32:31 2013 -0800 speed up notifications commit 586b4a18656f66fb2c518fb8e8fee66a016e8ae6 Author: Aaron Patterson Date: Wed Nov 6 16:31:05 2013 -0800 speed up runtime registry methods commit b67d074cb4314df9a88438f785868cef77e583d7 Author: Aaron Patterson Date: Wed Nov 6 16:28:12 2013 -0800 change method name and make it public --- activesupport/lib/active_support/cache/strategy/local_cache.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activesupport/lib/active_support/cache/strategy') diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index fb42c4a41e..cea7eee924 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -23,6 +23,9 @@ module ActiveSupport def set_cache_for(local_cache_key, value) @registry[local_cache_key] = value end + + def self.set_cache_for(l, v); instance.set_cache_for l, v; end + def self.cache_for(l); instance.cache_for l; end end # Simple memory backed cache. This cache is not thread safe and is intended only -- cgit v1.2.3