-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Revert fastresume functionality #11520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert fastresume functionality #11520
Conversation
May I ask why? I'm under the impression that the future is saving all the required info in .fastresume file and ditch the .torrent for resuming torrents.
|
That future isn't certain yet. The benefit of going back to the original way: 1) Reducing fastresume size. This hopefully helps generate and write the fastresume faster (probably marginally). 2) Why bother writing the same data corresponding to the info-dict again and again to disk when we only need the torrent state in the fastresume? From a quick lookup in my fastresumes: Old ones rarely go above 5KB in size. New ones usually are bigger than 50KB. |
How come? IMO it is more like not fully implemented yet, because the original idea is to preserve the downgrade path in case qbt v4.2.0 or libtorrent RC_1_2 isn't stable.
This is for the downgrade path as mentioned above, otherwise we would have ditched all unnecessary .torrent from qbt.
This might be a slowdown problem if there are many torrents, but even so the more important question is still the aforementioned "future". |
It was just a thought of the libtorrent author. It isn't implemented yet.
Let me rephrase. Part of the fastresume is now the info-dict. Which is static data. Fastresumes get rewritten multiple times. Why should we keep re-writing those static data? The old way avoids that. And to me, there wasn't a real reason to switch apart from fixing the bug in PR #11104, which is now properly fixed in libtorrent. And if we want to revamp the saving system it is better to go eg the sqlite route than keep messing with individual files. (IIRC I have an old and forgotten PR pending for that). |
@arvidn @sledgehammer999 |
|
I'm envisioning a future where In such a future, instead of loading a .torrent file into a I don't have any measurements on the cost of saving the I would think that the cost of saving resume data is less important too, since you can stagger saving the torrents (i.e. you don't need to save them all at once), whereas when you load them, you do have to load them all at once. |
just to be clear, this is a vision that's pretty far out and I'm not actively working towards it (yet). I'm open to suggestions, criticism or better alternatives. |
Splitting mutable and immutable part of torrent metadata is really good idea 👍 |
Now that the problem behind PR #11104 is correctly addressed via arvidn/libtorrent#4112, let's go back to our original way of storing/loading fastresumes.