mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 08:16:49 +00:00
fix: Improve python writeS3File perf (#3182)
This commit is contained in:
@@ -876,11 +876,11 @@ impl<R: AsyncRead> AsyncRead for ProgressReadAdapter<R> {
|
||||
match this.interval.poll_tick(cx) {
|
||||
Poll::Pending => {}
|
||||
Poll::Ready(_) => {
|
||||
tracing::info!("read {} bytes for s3 upload", *this.interval_bytes * 10);
|
||||
*this.total_bytes += *this.interval_bytes;
|
||||
tracing::info!("uploaded {} bytes for s3 upload", *this.total_bytes);
|
||||
*this.interval_bytes = 0;
|
||||
}
|
||||
};
|
||||
*this.total_bytes += *this.interval_bytes;
|
||||
|
||||
#[cfg(not(feature = "enterprise"))]
|
||||
if *this.total_bytes > 50 * 1024 * 1024 {
|
||||
|
||||
@@ -50,7 +50,7 @@ class S3BufferedReader(BufferedReader):
|
||||
|
||||
def bytes_generator(buffered_reader: BufferedReader | BytesIO):
|
||||
while True:
|
||||
byte = buffered_reader.read(1)
|
||||
byte = buffered_reader.read(50 * 1024)
|
||||
if not byte:
|
||||
break
|
||||
yield byte
|
||||
|
||||
Reference in New Issue
Block a user