zendesk/active_record_host_pool — pull request #1 by bquorning (2012-06-07 09:53:08+00:00)
Title: Memoize the pool key, created by string interpolation

Running a performance test recently, I noticed that #_pool_key generated a lot of objects:

6.72% 0.42% 24728.00 1545.00 0.00 23183.00 772 ActiveRecordHostPool::PoolProxy#_pool_key
12373.00 3089.00 0.00 9284.00 3088/33571 Hash#[]
6624.00 6950.00 0.00 1204.00 772/2279 Array#map
1544.00 1544.00 0.00 0.00 772/828 Symbol#to_proc
772.00 772.00 0.00 0.00 772/1376 Array#join

I am fairly certain that it is safe to memoize #_pool_key. @osheroff, do you know?