#36281: ASGIHandler perfoms sync writes when reading the chunks of a HTTP
response's body
--------------------------------------+------------------------------------
     Reporter:  Brian Atkinson        |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  HTTP handling         |                  Version:  dev
     Severity:  Normal                |               Resolution:
     Keywords:  asgi async            |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Comment (by Carlton Gibson):

 That's a good one. Yes. A consideration for being careful about allowed
 body sizes under ASGI. It'd be interesting to see what other ASGI
 frameworks do here.

 > …use a 3rd party library like ​asynctempfile (unclear whether this is
 currently maintained)…

 It looks small and depends on [https://pypi.org/project/aiofiles/
 aiofiles] which is a package I'd trust. It could likely be vendored if
 needed, perhaps using the async version if `aiofiles` was available.

 (I'd have to think through the severity of the blocking I/O to say whether
 using such would be recommended or even required. We already mention
 `aiofiles` in the docs, e.g. FileResponses.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36281#comment:4>
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/01070195ed808105-362df697-5909-44a8-ae16-06302d60d974-000000%40eu-central-1.amazonses.com.

Reply via email to