Skip to content
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

Session save optimization #77

Open
pyroscope opened this issue Apr 19, 2018 · 2 comments
Open

Session save optimization #77

pyroscope opened this issue Apr 19, 2018 · 2 comments

Comments

@pyroscope
Copy link
Owner

DownloadStore::save(Download* d, int flags) could be optimized to not write unchanged resume data (by adding a new flag). Implement by storing the SHAs of the bencode data last written, adding very little memory overhead.

Reasons are less SSD wear and tear (a big session can have 100MiB, written every 20min by defaut), and UI freezes can happen if the file system blocks or is slow. Many loaded mostly idle items make this more prominent.

Note that uncertain_pieces.timestamp in *.libtorrent_resume changes every time.

@pyroscope
Copy link
Owner Author

Another route could be to write a command that saves the session in chunks of size arg.0 (using the uncertain_pieces.timestamp to roll through loaded items), and change the save_session schedule to run way more often and use that new command.

@chros73
Copy link
Contributor

chros73 commented Apr 20, 2018

Since I went through all your configs and I haven't seen this in them (as far as I can recall):
this can be a workaround until you fix it.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants