Commit 31f24df
authored
go.mod: bump anacrolix/torrent to halve per-piece memory (erigontech#21837)
Bumps `github.com/anacrolix/torrent` to a revision that shrinks the
`Piece` struct.
## What
The torrent `Piece` struct was reduced from ~288 bytes to 144 bytes
(field reordering to remove padding, making `hashV2` a pointer, and
interning the published piece state). This drops each `Piece` from the
288-byte allocation size class to the 144-byte size class — both
exact-fit classes, so the per-piece footprint is **halved**.
With mainnet snapshots holding millions of pieces across all torrents,
this is a meaningful reduction in steady-state torrent memory.
## Relation to erigontech#21684
This is one part of reducing torrent RAM usage. A follow-up PR will
reduce the **piece count** itself (dynamic per-snapshot piece sizing),
which compounds with this change.
Refs erigontech#216841 parent 5efb6be commit 31f24df
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
0 commit comments