diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-11-18 15:27:42 -0800 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-11-18 15:27:42 -0800 |
commit | a04851702b0e8e694a92139c3ee9f3b1622f3f5d (patch) | |
tree | 9e93f878b2d6cdd96dea4665e14510665ee41218 /test/visitors | |
parent | 590c784a30b13153667f8db7915998d7731e24e5 (diff) | |
download | rails-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/visitors')
-rw-r--r-- | test/visitors/test_to_sql.rb | 2 |
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 |