Commit 07d4d66
committed
fix: httpx.Client is slow when sending large data
This commit addresses an issue where sending large data with httpx.Client was
extremely slow. The problem was that the entire data payload was being loaded
into memory and sent in a single operation.
This fix refactors the sending process for iterable bytes types to use a
chunked approach with `yield`, which significantly improves performance and
reduces memory usage for large payloads.
Signed-off-by: xiexianbin <[email protected]>1 parent 3fee278 commit 07d4d66
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
0 commit comments