aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-11-18 15:27:42 -0800
committerSean Griffin <sean@thoughtbot.com>2014-11-18 15:27:42 -0800
commita04851702b0e8e694a92139c3ee9f3b1622f3f5d (patch)
tree9e93f878b2d6cdd96dea4665e14510665ee41218 /test
parent590c784a30b13153667f8db7915998d7731e24e5 (diff)
downloadrails-a04851702b0e8e694a92139c3ee9f3b1622f3f5d.tar.gz
rails-a04851702b0e8e694a92139c3ee9f3b1622f3f5d.tar.bz2
rails-a04851702b0e8e694a92139c3ee9f3b1622f3f5d.zip
Use class objects rather than strings for the dispatch cache
The only reason we're using strings is to pre-populate the cache, but `Class#name` returns a new string instance on every call. This is a pretty major source of memory usage. We don't technically need to pre-populate the cache, and not doing so allows us to go back to using cache objects
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_to_sql.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index 7895866809..2e3f7f8624 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -36,7 +36,7 @@ module Arel
end
def dispatch
- { Arel::Table.name => 'hello' }
+ { Arel::Table => 'hello' }
end
}.new