perf(importer): raise default max_download_prefetch from 3 → 10#359
Merged
perf(importer): raise default max_download_prefetch from 3 → 10#359
Conversation
Adds a sevenZipPrefetch(base) helper that returns max(base×3, 10). The 7z processor now gets 3× more concurrent segment prefetch than the configured base value, ensuring multiple NNTP connections are kept busy during 7z stream analysis instead of downloading one segment at a time. The RAR processor is unchanged and continues to use the configured maxDownloadPrefetch value. Closes #101 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Raises the global MaxDownloadPrefetch default from 3 to 10, benefiting both 7z and RAR archive analysis without special-casing either format. Removes the sevenZipPrefetch() multiplier helper that was introduced in #101, keeping the codebase simpler and the behaviour consistent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
drondeseries
referenced
this pull request
in drondeseries/altmount_old
Apr 16, 2026
* perf(importer): raise default max_download_prefetch from 3 to 10 Raises the global MaxDownloadPrefetch default from 3 to 10, benefiting both 7z and RAR archive analysis without special-casing either format. Removes the sevenZipPrefetch() multiplier helper that was introduced in #101, keeping the codebase simpler and the behaviour consistent.
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.
Summary
MaxDownloadPrefetchdefault from 3 → 10, improving archive analysis throughput for both 7z and RARsevenZipPrefetch()multiplier helper introduced in 7-Zip archives use single connection on Sonarr import #101, eliminating the 7z-specific special-caseMotivation
#101 added a
sevenZipPrefetch()helper that tripled the base prefetch (min 10) for 7z archives only. The simpler and equally effective fix is to raise the global default to 10, which benefits all archive types without extra indirection and removes the asymmetry between the RAR and 7z processors.Changes
internal/config/manager.goMaxDownloadPrefetchdefault3→10internal/importer/processor.gosevenZipPrefetch()helper; passmaxDownloadPrefetchdirectlyTest plan
go build ./...passesgo test ./internal/importer/...passes🤖 Generated with Claude Code