Branch: refs/heads/master
Home:
https://github.com/django/django
Commit: ff723d894d9272ea721d1996432ffc806c2b8180
https://github.com/django/django/commit/ff723d894d9272ea721d1996432ffc806c2b8180
Author: Anssi Kääriäinen <
akaa...@gmail.com>
Date: 2013-09-14 (Sat, 14 Sep 2013)
Changed paths:
M django/db/models/sql/compiler.py
M django/db/models/sql/query.py
Log Message:
-----------
Fixed #20950 -- Instantiate OrderedDict() only when needed
The use of OrderedDict (even an empty one) was surprisingly slow. By
initializing OrderedDict only when needed it is possible to save
non-trivial amount of computing time (Model.save() is around 30% faster
for example).
This commit targetted sql.Query only, there are likely other places
which could use similar optimizations.