#18748: Remove dupe-avoidance logic from the ORM -------------------------------------+------------------------------------- Reporter: akaariai | Owner: nobody Type: | Status: new Cleanup/optimization | Version: master Component: Database | Keywords: layer (models, ORM) | Has patch: 1 Severity: Normal | Needs tests: 0 Triage Stage: Ready for | Easy pickings: 0 checkin | Needs documentation: 0 | Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- There is some complicated-looking and zero documented logic related to dupe avoidance in sql/query.py and sql/compiler.py. I began to wander what exactly the dupe avoidance does. It turns out it does nothing. I removed the dupe-avoidance, and all tests still pass.
The main benefit is easier to follow code. There should be a slight speed advantage, too, but it is so small it is unmeasurable. However I did confirm the removal of dupe-avoidance doesn't lead to speed problems using djangobench. Patch can be found from: https://github.com/akaariai/django/tree/dupe_away I am marking this as RFC. I will likely commit this one soon if nobody complains. -- Ticket URL: <https://code.djangoproject.com/ticket/18748> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.