Here, and a number of other places you're making several calls out to the DB, where despite being async, these will run sequentially, as the code will wait for the first yield to return before executing the second. A bit of Googling comes up with a pretty simple solution: http://stackoverflow.com/questions/3894278/twisted-deferred-addcallback-vs-yield-and-inlinedeferred

My slight worry with this approach is that it might make the tests harder to write. Thoughts?