#35102: Performance regression on Model.objects.count() between Django 4.2 and
5.0
-------------------------------------+-------------------------------------
Reporter: Anthony Shaw | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"d074c7530b812a7b78c9a201c8a70f281ed3a36e" d074c753]:
{{{
#!CommitTicketReference repository=""
revision="d074c7530b812a7b78c9a201c8a70f281ed3a36e"
Refs #35102 -- Optimized Expression.identity used for equality and
hashing.
inspect.signature() is quite slow and produces the same object for each
instance of the same class as they share their __init__ method which
makes it a prime candidate for caching.
Thanks Anthony Shaw for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35102#comment:16>
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/0107018d0c4b7462-3613c8e7-f473-4fd9-8893-94ac5838068a-000000%40eu-central-1.amazonses.com.