Skip to content

perf: Buffer zip output writes and write decoded res files in parallel - #3

Merged
LisoUseInAIKyrios merged 1 commit into
mainfrom
perf/buffered-write-parallel-decode
Oct 3, 2026
Merged

LisoUseInAIKyrios merged 1 commit into
mainfrom
perf/buffered-write-parallel-decode

Conversation

@LisoUseInAIKyrios

Copy link
Copy Markdown

Adds buffering to FileChannelOutputStream.

Patching YouTube reduces file write time from ~7 seconds to ~1.2 seconds.

The stream now buffers writes, and ZipFileOutput flushes before using the channel directly.

Decoded res files are written by 2 background threads. Decoding is still done on the calling thread as the table is not thread safe.

Tried with 4 threads and increasing MAX_PENDING_WRITE_BYTES, but performance did not improve over 2 threads and 16MB pending write buffer.

@LisoUseInAIKyrios
LisoUseInAIKyrios merged commit 18ad6b5 into main Oct 3, 2026
1 check passed
@LisoUseInAIKyrios
LisoUseInAIKyrios deleted the perf/buffered-write-parallel-decode branch October 3, 2026 18:04
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.

1 participant