#37156: Properly implement async Redis methods
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Core (Cache system) | Version: 6.0
Severity: Normal | Resolution:
Keywords: redis, asyncio, | Triage Stage:
async | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
> ... the extra threading comes with a significant overhead
Sigh. This is essentially a myth, at least these days. Unless you're
repeatedly crossing the boundary in a hot-loop — which, don't! — overhead
is essentially negligible.
Redis-py's async client is no faster than the sync client (indeed it seems
slightly slower, but I need to verify that before stating definitively —
it's negligible too though). Throughput is limited by pool size. And do
enable pipelining!
I shall put writing this up on the backlog, but it's not at all clear that
the argument to remove (particularly) `sync_to_async` calls throughout
is/remains sound.
> ...core devs won't want to...
> ... core devs don't like ...
This phrasing isn't helpful. (TBH it verges on a prompting a CoC report,
since it's frequent.) The original design decisions were to support both
sync and async views (and so code) under both WSGI and ASGI, and (given
that) duplicating the entire code tree with pure async versions is not a
sustainable strategy. Nothing has changed there. It's not about "want to"
or "not liking".
--
Ticket URL: <https://code.djangoproject.com/ticket/37156#comment:2>
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/0107019eb5a5bc3a-c6b6b4ef-682b-4f16-9b7f-3d5885e69ba1-000000%40eu-central-1.amazonses.com.