#37125: Use __new__ to sanitize TaskResult instead of __post_init__ to half
memory
usage
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Type:
| Cleanup/optimization
Status: new | Component: Tasks
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
[https://forum.djangoproject.com/t/tasks-framework-versatility-
performance/45035/4 Jake and I have been discussing changes to the Task
framework for 6.2 with a focus on performance and versatility.]
One discovery was the memory overhead created by `__post_init__` which
doubles the working memory when compared to a factory method.
A `__new__` method is what I used in the benchmark and what I would
consider the most Pythonic way while also maintaining full compatibility.
--
Ticket URL: <https://code.djangoproject.com/ticket/37125>
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/0107019e6f224003-dc1db914-2cae-45ad-9710-c528bfe7b7da-000000%40eu-central-1.amazonses.com.