#36927: Optimize Field.deconstruct()
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: Adam Johnson
Johnson |
Type: | Status: assigned
Cleanup/optimization |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I profiled a subset of Django’s test suite (`runtests.py --parallel 1
model* queries expressions*`) with cProfile and found that
`Field.deconstruct()` was the function in Django with the largest time
consumed inside itself (0.123s of 7.843 total, or 1.6%).
It can be optimized by flattening its main loop for constructing keyword
arguments and by performing fewer string comparisons for the path.
--
Ticket URL: <https://code.djangoproject.com/ticket/36927>
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/0107019c59680b7c-0da6019d-1542-40ea-b126-7035e074c1ee-000000%40eu-central-1.amazonses.com.