#36977: Cache more expression `output_field` properties
-------------------------------------+-------------------------------------
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 |
-------------------------------------+-------------------------------------
Many expression classes use `@cached_property` on `output_field` to avoid
recomputation, such as
[https://github.com/django/django/blob/0ae0029c2f4d82af937e9632cd5bf13e81e91f98/django/contrib/gis/db/backends/postgis/operations.py#L116-L118
`ST_Polygon`] and
[https://github.com/django/django/blob/0ae0029c2f4d82af937e9632cd5bf13e81e91f98/django/db/models/lookups.py#L162-L164
`Lookup`]. However, the opportunity has been missed in some expression
classes.
--
Ticket URL: <https://code.djangoproject.com/ticket/36977>
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/0107019cca71d695-fabea377-e93c-4adb-a388-616a9845d687-000000%40eu-central-1.amazonses.com.