rails/rails — Issue #3257: Rails 2.3/3.1 TimeZone calculation/parsing performace gap
Author: ncri
Created: 2011-10-08 13:53:36+00:00
State: open

Why does this code

500.times { Time.now.in_time_zone('Helsinki') }

take several seconds with Rails 3.1 while it takes only a split second in Rails 2.3 (both with Ruby 1.9.2-p290)?

I discovered this by searching for a cause for an extremely slow loading page after upgrading from Rails 2.3 to 3.1.

Any ideas? Also, how to fix it? Haven't found a workaround yet.