Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FORKED:
AsgiWhiteNoise
and asyncWhiteNoiseMiddleware
#359base: main
Are you sure you want to change the base?
FORKED:
AsgiWhiteNoise
and asyncWhiteNoiseMiddleware
#359Changes from 6 commits
9a56981
8590e82
24c5319
391bd8e
3e735ec
42fbe15
aec9ac1
cf4ee09
9616e78
35b9003
8eef8d3
2f0f685
f4931e3
3fb5a38
3bb4088
8a0930e
e6fd03b
8fc1682
64fc5c7
83fea65
58f3743
f79aec7
e18df38
45301b2
88ccf21
998cf5e
d611e90
54c7148
1057a77
ea2e84c
6dcecc0
c506e96
9892bea
e636411
41468a1
08c70fb
240ce22
be3796c
b81ab6b
7aeb29a
cd0ab1b
1265f03
f5e9d37
0e42cb8
279b342
890fdd8
ba3bed4
7af5b32
ee068a7
f09b384
ca26354
c2c320c
d0e9bfa
33ad918
067ab33
a15422f
8d01092
d6bb4d8
2a386cc
06a874f
1f9f8b3
64c1c27
f3b00ab
68f19c2
00f064d
e5f7526
9ee0d7d
d97a05b
2dbc8b2
de3456e
f0f0a66
511da12
7fd30ef
62de430
bb62496
d839cf8
b40ff65
522a50b
518a46b
ed07496
3bff168
4c98b5e
4656a53
4a77e8b
dd2d700
ea74977
2bc2a7b
d648ffc
f6bf0c2
367a17d
e3bea39
b895b8f
7132626
56fe9d1
17b9dc7
2dc620e
6d4baf3
f8fb573
b91dd7e
5eaac51
292de02
3117769
5de2d63
6197911
37dfac6
f20e90d
865a68d
d8f564e
4c2ca1d
b238278
fb118ad
8e8c63b
bd580a2
371ca90
6695140
018f864
3a0180a
29c678c
6da4dfd
b1c8ae3
88e8a86
1f0fa9f
5b74486
9f77bf7
484ddb4
07b8b3d
4db8458
503e957
67f8dee
1f8c4b2
aa36dce
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So ASGI has a "zero copy send" extension: https://asgi.readthedocs.io/en/latest/extensions.html#zero-copy-send
This is much more efficient than chunking and recombining the file in Python
That said, it looks like support isn't there yet:
So it might be worth creating a follow-up issue for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's also a PR for hypercorn, jfyk: https://gitlab.com/pgjones/hypercorn/-/merge_requests/62
in any case, none of the ASGI servers supports it yet 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has anything changed in the "zero copy send" landscape?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created a fork of hypercorn to add all extension support here, you can have a try, currently it's under development and should work with all asgi extension listed in asgi spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even when zero copy send gets merged into most ASGI webservers, there's still the question of Windows compatibility.
Ref: https://discuss.python.org/t/support-for-os-sendfile-for-windows/25020