aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/test_response.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2015-02-10 13:48:08 -0500
committereileencodes <eileencodes@gmail.com>2015-02-12 14:48:14 -0500
commit0acd4a57768fc3c7e758f9f4b26563797f43e7ef (patch)
tree703d5e7342d871623b26815a5519168a77b8d532 /actionpack/lib/action_dispatch/testing/test_response.rb
parentce32ff462f3ba89c87f337f9150b3976d23220e8 (diff)
downloadrails-0acd4a57768fc3c7e758f9f4b26563797f43e7ef.tar.gz
rails-0acd4a57768fc3c7e758f9f4b26563797f43e7ef.tar.bz2
rails-0acd4a57768fc3c7e758f9f4b26563797f43e7ef.zip
Skip url_helpers instead of caching, speed up integration tests
We shouldn't cache if it's not absolutely necessary. Removes route caching and instead skips using the `url_helpers` is the integration test session doesn't require it. Benchmark ips on integration and controller index method tests below. Without any caching or changes to `#url_helpers`: ``` Calculating ------------------------------------- INDEX: Integration Test 71.000 i/100ms INDEX: Functional Test 99.000 i/100ms ------------------------------------------------- INDEX: Integration Test 728.878 (± 8.0%) i/s - 3.692k INDEX: Functional Test 1.015k (± 6.7%) i/s - 5.148k Comparison: INDEX: Functional Test: 1015.4 i/s INDEX: Integration Test: 728.9 i/s - 1.39x slower ``` With caching on `#url_helpers`: ``` Calculating ------------------------------------- INDEX: Integration Test 74.000 i/100ms INDEX: Functional Test 99.000 i/100ms ------------------------------------------------- INDEX: Integration Test 752.377 (± 6.9%) i/s - 3.774k INDEX: Functional Test 1.021k (± 6.7%) i/s - 5.148k Comparison: INDEX: Functional Test: 1021.1 i/s INDEX: Integration Test: 752.4 i/s - 1.36x slower ``` Afer removing the caching and bypassing the `url_helpers` when not necessary in the session: ``` Calculating ------------------------------------- INDEX: Integration Test 87.000 i/100ms INDEX: Functional Test 97.000 i/100ms ------------------------------------------------- INDEX: Integration Test 828.433 (± 6.4%) i/s - 4.176k INDEX: Functional Test 926.763 (± 7.2%) i/s - 4.656k Comparison: INDEX: Functional Test: 926.8 i/s INDEX: Integration Test: 828.4 i/s - 1.12x slower ```
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/test_response.rb')
0 files changed, 0 insertions, 0 deletions