Speedups inspired by High Performance Django and Debug Toolbar... 10x speedup in an hour!