#35102: Performance regression on Model.objects.count() between Django 4.2 and
5.0
-------------------------------------+-------------------------------------
Reporter: Anthony Shaw | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Anthony Shaw):
If Expression.__hash__ (Expression.identity()) were to implement another
mechanism for determining a unique hash that doesn't depend upon using
`inspect.signature` the benchmark would be much faster since this is
evaluated twice. I suspect this would impact other benchmarks as well,
hash functions should be as fast as possible but I understand why that is
challenging for something like expressions. inspect.signature is a very
slow function that does a huge amount of processing to build a Signature
object for the given callable.
--
Ticket URL: <https://code.djangoproject.com/ticket/35102#comment:9>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/0107018cfa153a26-f9f894eb-4e83-4465-a4f1-19f3da2ee182-000000%40eu-central-1.amazonses.com.