dominikh / gamayun

Torrent client designed for seeding tens of thousands of torrents.
MIT License
14 stars 0 forks source link

Load metainfo lazily #15

Open dominikh opened 3 years ago

dominikh commented 3 years ago

In a seed-centric workload with lots of torrents, keeping all metainfo in memory at all times is a waste of memory. The majority of torrents will be idle and not need to know more than their infohash. Even active torrents won't need piece hashes if they're just seeding. We should load metainfo lazily, and only load the subset of metainfo that we need.