Skip to content

Remove output buffers and queue left unused by spill-file output - #1069

Merged
ch4rr0 merged 1 commit into
DerrickWood:masterfrom
tfenne:tf_remove_unused_output_buffers
Oct 30, 2026
Merged

ch4rr0 merged 1 commit into
DerrickWood:masterfrom
tfenne:tf_remove_unused_output_buffers

Conversation

@tfenne

@tfenne tfenne commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Since 71a5e20 moved ordered output to spill files and file_queue, several pieces of the previous in-memory output path have no remaining uses: the output_queue priority queue and its comparator, the buffers vector of two OutputData per thread, the per-thread ostringstreams, and the empty OutputData::write and unused OutputData::valid.

This removes dead code only. Each buffers entry reserved 4 MB for its Kraken output string, but the reservation was never touched and so never became resident; classify's peak private memory is about 220 MB at 16 threads either way.

The end-to-end suite passes, and per-read output, classified and unclassified files and report are identical to master on 616,000 fixture-derived pairs at 8 threads.

Since 71a5e20 moved ordered output to spill files and file_queue, several pieces of the previous in-memory output path have no remaining uses: the output_queue priority queue and its comparator, the buffers vector of 2 OutputData per thread, the per-thread ostringstreams, and the empty OutputData::write and unused OutputData::valid.

This removes dead code only. Each buffers entry reserved 4 MB for its Kraken output string, but the reservation was never touched and so never became resident; the measured peak private memory of classify is about 220 MB at 16 threads with or without it.

The end-to-end suite passes, and per-read output, classified and unclassified files and report are identical to master on 616,000 fixture-derived pairs at 8 threads.
@tfenne tfenne mentioned this pull request Oct 28, 2026
@ch4rr0
ch4rr0 merged commit 79efb24 into DerrickWood:master Oct 30, 2026
8 checks passed
@tfenne
tfenne deleted the tf_remove_unused_output_buffers branch November 8, 2026 13:43
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.

2 participants