Skip to content

Chunk file streaming for improved performance - #44

Merged
alxbridge merged 2 commits into
mainfrom
fix/streamed-download-performance
Nov 12, 2025
Merged

Chunk file streaming for improved performance#44
alxbridge merged 2 commits into
mainfrom
fix/streamed-download-performance

Conversation

@alxbridge

@alxbridge alxbridge commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

Following on from #43, this adds back in the chunk_size argument which I previously removed from that PR: I mistakenly thought that 8192 was the default chunk_size for iter_content(), where in fact it's 1: using such a small chunk size negatively affects the performance of the streaming download.

As iter_content with a specified chunk_size won't iterate if the response is empty, I've added a separate check to ensure any cases of this are raised as a validation error.

@alxbridge
alxbridge force-pushed the fix/streamed-download-performance branch from 5db936b to 7df6bb7 Compare November 12, 2025 12:27
@alxbridge
alxbridge requested a review from zerolab November 12, 2025 12:31
Comment thread src/wagtail_bynder/utils.py

@zerolab zerolab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready for 0.8.1

@alxbridge
alxbridge merged commit c1d2577 into main Nov 12, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants