Last Comment Bug 817656 - Speed up slow ratings tests
: Speed up slow ratings tests
Status: RESOLVED WONTFIX
: perf
Product: Marketplace
Classification: Server Software
Component: Code Quality (show other bugs)
: 1.0
: x86 Mac OS X
: P4 normal (vote)
: 2013-01-10
Assigned To: Allen Short [:ashort]
:
:
Mentors:
Depends on:
Blocks: marketplace-perf
  Show dependency treegraph
 
Reported: 2012-12-03 09:43 PST by Andy McKay [:andym]
Modified: 2014-10-02 08:12 PDT (History)
2 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Andy McKay [:andym] 2012-12-03 09:43:44 PST
The slowest test in terms of setup time (fixtures, everything in setUp) is:

zamboni.mkt.ratings.tests.test_views.TestCreate

And of the 20 slowest tests, a couple of the tests in that class are the slowest, eg:

zamboni.mkt.ratings.tests.test_views.TestCreate.test_body_has_url
zamboni.mkt.ratings.tests.test_views.TestListing.test_detail_local_reviews_only

etc.. clocking in at around 3.5 seconds a test.
Comment 1 Allen Short [:ashort] 2013-01-14 16:01:59 PST
Got around a 30% speedup. Most of the time is spent in the ORM, of course. 

https://github.com/mozilla/zamboni/commit/ec681e2f867dcc6c88117c6199167779eea73968
Comment 2 Andy McKay [:andym] 2013-01-18 17:00:43 PST
It still shows up as the slowest test in the site however.

http://cl.ly/image/1M3w152X3p3G
Comment 3 Allen Short [:ashort] 2013-02-20 08:33:09 PST
making our tests faster is going to require an overhaul of more than a few things.

Note You need to log in before you can comment on or make changes to this bug.