Skip to content

Avoid triggering millions of syscalls when unpacking compressed files like the Flutter SDK - #674

Merged
bytemain merged 1 commit into
version-fox:mainfrom
linghengqian:fix-flutter
Jun 1, 2026
Merged

bytemain merged 1 commit into
version-fox:mainfrom
linghengqian:fix-flutter

Conversation

@linghengqian

@linghengqian linghengqian commented May 31, 2026 •

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings May 31, 2026 13:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds XZ tar archive decompression support and test coverage, plus a minor performance improvement by wrapping the xz reader with a buffered reader.

Changes:

  • Wrap xz.NewReader input with bufio.NewReader for buffered I/O.
  • Add tests covering single-file, root-folder-stripping, and multi-file XZ tar decompression scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/shared/util/decompressor.go Use buffered reader when constructing the xz reader.
internal/shared/util/decompressor_test.go Add tests for XZTarDecompressor and a writeXzTar helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/shared/util/decompressor.go Outdated
}
defer file.Close()
gzr, err := xz.NewReader(file)
gzr, err := xz.NewReader(bufio.NewReader(file))
@bytemain
bytemain merged commit 346ea08 into version-fox:main Jun 1, 2026
@linghengqian
linghengqian deleted the fix-flutter branch June 1, 2026 03:21
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.

Unpacking takes a very long time

3 participants