You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by sc...@apache.org on 2025/11/18 09:53:40 UTC
(beam) branch master updated: Increase the GZip DeflaterOutputStream buffer size to increase performance (#36818)
This is an automated email from the ASF dual-hosted git repository.
scwhittle pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new b843f4af3eb Increase the GZip DeflaterOutputStream buffer size to increase performance (#36818)
b843f4af3eb is described below
commit b843f4af3eb3c42034510fdfecaee8a4394b1bd6
Author: Sam Whittle <sc...@users.noreply.github.com>
AuthorDate: Tue Nov 18 10:53:33 2025 +0100
Increase the GZip DeflaterOutputStream buffer size to increase performance (#36818)
---
sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java
index d9e7757547f..976245f7854 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java
@@ -99,7 +99,9 @@ public enum Compression {
@Override
public WritableByteChannel writeCompressed(WritableByteChannel channel) throws IOException {
- return Channels.newChannel(new GZIPOutputStream(Channels.newOutputStream(channel), true));
+ // Increase the default deflate output stream buffer size from 512 to 4096 for performance.
+ return Channels.newChannel(
+ new GZIPOutputStream(Channels.newOutputStream(channel), 4096, true));
}
},