Conversation
Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix slow extraction issue starting from v1.11.0
Remove expensive upfront archive scan blocking decompression
Jan 19, 2026
Member
|
@copilot 有什么办法保留检查空间是否足够还能解决解压缓慢的问题 |
Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Author
Copilot
AI
changed the title
Remove expensive upfront archive scan blocking decompression
Add timeout to space check to fix slow decompression while preserving safety
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since v1.11.0, decompression has been extremely slow due to
SpaceAvailableForDecompression()walking the entire archive before extraction begins. For large archives, this causes multi-minute delays and timeouts.Changes
SpaceAvailableForDecompression()in compress.gopostServerDecompressFileswith timeout protectionHasSpaceFor()validates before each chunk write (compress.go:261)Write()validates before each file creation (filesystem.go:156)c.Request.Context()for proper cancellationImpact
Small/Medium Archives: Full upfront space validation completes quickly, preventing failed extractions before they start.
Large Archives: Space check times out after 5 seconds and decompression proceeds immediately with incremental space validation during extraction.
Request Cancellation: Proper cleanup when users cancel requests.
Testing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.