#20950: Use OrderedDicts in ORM only when needed -------------------------------------+------------------------------------- Reporter: akaariai | Owner: nobody Type: | Status: closed Cleanup/optimization | Version: master Component: Database layer | Resolution: fixed (models, ORM) | Triage Stage: Accepted Severity: Normal | Needs documentation: 0 Keywords: | Patch needs improvement: 0 Has patch: 1 | UI/UX: 0 Needs tests: 0 | Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by Anssi Kääriäinen <anssi.kaariainen@…>):
* status: new => closed * resolution: => fixed Comment: In [changeset:"ff723d894d9272ea721d1996432ffc806c2b8180"]: {{{ #!CommitTicketReference repository="" revision="ff723d894d9272ea721d1996432ffc806c2b8180" 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. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/20950#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.7bd563267d0c307592deb5baf5a40e3e%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.