Performance Regression in 3.4.1
While running specs on a large application I maintain, I noticed a significant slowdown in running controller specs where the action would ordinarily render a template, when using 3.4.1 as compared to 3.4.0.
I have provided an example application which demonstrates this.
Benchmarking
The results I am seeing (using the timing in RSpec's own output) are:
3.4.0
Run 1: 2.51s Run 2: 2.55s Run 3: 2.54s
Average: 2.53s
3.4.1
Run 1: 6.99s Run 2: 7.04s Run 3: 7.06s
Average: 7.03s
Conjecture
I suspect this is related to the changes in PR #1535, specifically the commit 42b44a6a. Having a quick look at the commit, there are at least two extra map
operations in there compared to previously. I am not familiar with the code, and have not yet had the time to run a profiler with the specs in my example application to see if the extra iteration or resulting allocations are indeed the cause. I hope to do so tomorrow.