Skip to content

sort: add --threads and phase-timing output - #2591

Draft
hiruna72 wants to merge 2 commits into
samtools:developfrom
hiruna72:sort_threads
Draft

sort: add --threads and phase-timing output#2591
hiruna72 wants to merge 2 commits into
samtools:developfrom
hiruna72:sort_threads

Conversation

@hiruna72

Copy link
Copy Markdown

Adds --threads INT to bcftools sort, threading the final merge-to-output BGZF/BCF compression (same convention as view/concat/norm: compression of the output stream only). Also adds phase 1 / phase 2 elapsed-time lines on stderr (sort-to-temp-files vs. final-merge-and-write), using the same gettimeofday pattern already used in vcfconcat.c/vcfgtcheck.c.

Motivation: sorting very large VCFs was bottlenecked on the single-threaded final write. On a 333MB/382k-record real SV VCF, --threads 8 cut phase 2 from 37.2s to 9.4s (output verified byte-identical to the unthreaded run). Full test suite passes, no new failures.

Assisted-by: Claude:claude

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