Skip to content

perf: keep torrent file count instead of the file list - #49

Merged
Ryder-C merged 1 commit into
devfrom
shrink-torrent-records
Aug 11, 2026
Merged

perf: keep torrent file count instead of the file list#49
Ryder-C merged 1 commit into
devfrom
shrink-torrent-records

Conversation

@Ryder-C

@Ryder-C Ryder-C commented Aug 11, 2026

Copy link
Copy Markdown
Owner

The per-file records were only ever used for a length sum and a files.len() > 1 check.

So just sum at construction which avoids creating a new Vec for every torrent.

The per-file records were only ever used for a length sum and a
files.len() > 1 check, so summing at construction and storing the count
avoids carrying a Vec per torrent. Also drop the per-record String
allocation in the Incomplete-tag check.
@Ryder-C
Ryder-C merged commit 5d2bca8 into dev Aug 11, 2026
1 of 2 checks passed
@Ryder-C
Ryder-C deleted the shrink-torrent-records branch August 11, 2026 22:16
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