#37088: path based MediaAsset equality
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: Johannes
| Maron
Type: Bug | Status: assigned
Component: Forms | Version: 6.0
Severity: Normal | Resolution:
Keywords: Media MediaAsset | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Johannes Maron):
Good thing I did. I found another bog, we are comparing `self.path ==
other.path` instead of `self._path == other._path` which causing a 1_000 x
performance degradation, while adding `and self.attributes ==
other.attributes` adds almost no penalty.
Since most attributes will be empty dicts or include "rel". I believe we
can safely compare the whole dict.
--
Ticket URL: <https://code.djangoproject.com/ticket/37088#comment:4>
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019e02d745a0-6945a745-72d5-4fed-a052-03049335de66-000000%40eu-central-1.amazonses.com.