Commit cb487f3
committed
fix: [#1510] disable torrent stats importation at start
When the tracker starts, if stats persistence is enabled, all torrents that have ever been downloaded are loaded into memory (`Swarms` type) with their download counter.
That's the current way to count all downloads and expose that metric.
However, it does not work with **millions of torrents** (like in the tracker demo) becuase:
- It's too slow.
- It consumes too much memory (all torrents that have ever been downloaded have to be loaded).
A new solution is needed to keep that metric, but in the meantime, this disables that feature, producing these effects:
- Non-accurate value for downloads when the tracker is restarted.
- Increasing indefinitely the number of torrents in memory even if the "remove peerless torrents" policy is enabled (becuase this feature overrides that policy and peerless torrents are kept in memory).1 parent 672dfaa commit cb487f3
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| |||
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
0 commit comments