olhoneles/olhoneles — pull request #15 by luciocorrea (2014-03-06 21:15:41+00:00)
Title: Optimization in collect.py. 

Instead of calling save() for every Expense, we create a temporary list with up to a thousand objects (default) and use bulk_create().

It´s much faster because it will not hit the database len(ArchivedExpense) times for inserting.

And since bulk_create() uses transaction internally, we don't need it too.