I recently noticed that the Django test suite seemed to be ballooning
in run time, so I wrote a new test runner that tracked run times.  I
set it to emit run times longer than two seconds, and had the
following results (under PostgresSQL, since that's what we use in
production):

**********
Long run (3s): test_user_creation
(regressiontests.admin_views.tests.IncompleteFormTest)
Long run (1090s): API_TESTS (modeltests.fixtures.models.__test__)
Long run (8s): test_table_exists
(modeltests.proxy_model_inheritance.tests.ProxyModelInheritanceTests)
Long run (106s): API_TESTS (modeltests.fixtures_model_package.models.__test__)
Long run (109s): API_TESTS (modeltests.aggregation.models.__test__)
Long run (6s): test_correct_url_but_nonexisting_gives_404
(modeltests.validation.tests.BaseModelValidationTests)
Long run (14s): API_TESTS (regressiontests.queries.models.__test__)
Long run (7s): test_urlfield_39
(regressiontests.forms.fields.FieldsTests)
Long run (105s): API_TESTS
(regressiontests.aggregation_regress.models.__test__)
Long run (225s): test_json_serializer
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (105s): test_json_serializer_fields
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (112s): test_json_serializer_stream
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (213s): test_python_serializer
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (112s): test_python_serializer_fields
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (213s): test_xml_serializer
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (112s): test_xml_serializer_fields
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (105s): test_xml_serializer_stream
(regressiontests.serializers_regress.tests.SerializerTests)
Long run (2s): test_expiration
(regressiontests.cache.tests.DBCacheTests)
Long run (2s): test_set_many_expiration
(regressiontests.cache.tests.DBCacheTests)
Long run (2s): test_expiration
(regressiontests.cache.tests.DummyCacheTests)
Long run (2s): test_expiration
(regressiontests.cache.tests.FileBasedCacheTests)
Long run (2s): test_set_many_expiration
(regressiontests.cache.tests.FileBasedCacheTests)
Long run (2s): test_expiration
(regressiontests.cache.tests.LocMemCacheTests)
Long run (2s): test_set_many_expiration
(regressiontests.cache.tests.LocMemCacheTests)
Long run (112s): API_TESTS
(regressiontests.m2m_through_regress.models.__test__)
Long run (4s): API_TESTS
(regressiontests.fixtures_regress.models.__test__)
**********

Sticking out like a sore thumb is API_TESTS under
modeltests.fixtures.models.__test__, which clocks in at 1090
seconds(!).  The serializer tests also seem to take a pretty chunk of
time at about 1-3 minutes each.  I run the test suite fairly regularly
(since we merge from upstream aggressively), and the total run time
recently jumped from about 20 minutes to around an hour.  Any ideas as
to why these tests are taking so long?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to