On Thu, Sep 6, 2012 at 12:16 PM, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: > On 3 syys, 07:40, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: >> I would like to make the TransactionTestCase faster. Currently when >> running Django's test suite, for every test ran you will truncate >> around 1000 tables, then create around 4000 objects (permissions + >> content types). Likely you will write to one or two tables in the >> test, and then do the truncate/recreate dance again. There is room for >> improvement. Track which tables have been modified and refresh only >> those tables. > > I now have a pretty good WIP approach of tracking changes in testing. > The changes can be found from here: [https://github.com/akaariai/ > django/tree/fast_tests_merged]. The approach relies on existing > signals + a new "model_changed" signal, which is used to signal > bulk_create and .update() changes, and could be used for raw SQL > changes, too. > > The results are promising: > - PostgreSQL with selenium tests, master 33m4s, patched: 9m51s > - SQLite, no selenium tests, master: 7m35s, patched: 3m6s.
Well that is pretty damn awesome. It also doesn't fix my problem. Let's ignore my problem for now, though. I'd like to look at the diffs. I doubt this is the real diff: https://github.com/akaariai/django/compare/master...fast_tests_merged What's the base branch for the fast_tests_merged comparison? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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.