#37125: Use __new__ to sanitize TaskResult instead of __post_init__ to half 
memory
usage
-------------------------------------+-------------------------------------
     Reporter:  Johannes Maron       |                    Owner:  (none)
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Tasks                |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Johannes Maron):

 … and the results:

 {{{
 TaskResult with __post_init__
   Time:      1.126s  (1.13 µs/call)
   Peak mem:  252.19 MB (for 1,000,000 instances)

 TaskResult with classmethod factory
   Time:      1.326s  (1.33 µs/call)
   Peak mem:  137.76 MB (for 1,000,000 instances)
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37125#comment:3>
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/0107019e6fdfc515-730a3691-c0a8-483a-b26a-6e798817e153-000000%40eu-central-1.amazonses.com.

Reply via email to