These are chat archives for anacrolix/torrent

Nov 2017
Nov 02 2017 09:35
Hey Matt, will the library actively seed, by connecting to peers who need more data? Or when seeding, does it wait for peer connections then seed to them?
Matt Joiner
Nov 02 2017 10:44
I believe the former. Let me find the function
Yes it will dial out if it's seeding. See Torrent.wantConns and Client.openNewConns
Nov 02 2017 11:02
Thank you! Very helpful, found it was a bug our side, the seeding timer cutting it off after a second rather than 1 hour, which should have been the default.
I have noticed it doesn't seem to make an effort to upload anything until we finish the download, then the seeding kicks in.
Nov 02 2017 11:10
And is there any reason this is desired behaviour?
@elgatito 's memory driver, when it works, will only ever hold a small percentage of the torrent in memory, so we'll never have it all downloaded.
It'll be great it we can let people seed the pieces they have, even on an incomplete torrent, even when saving to disk if only streaming for a short period of time, if that's possible?
Matt Joiner
Nov 02 2017 11:49
Yes that's the reason. It's because the implementation attempts to upload to peers that are uploading to us.
I think it was put in there to ensure responsiveness in uploading requests to those peers
I think with some testing the needData and seeding methods can be improved, let me know your thoughts
My primary use case doesn't make use of seeding, so it's not as heavily tested.
Nov 02 2017 11:58
Yes I agree it needs some tweaking, although you are more the expert on how to improve and if it is those methods.
If @elgatito is releasing the successor to Quasar based on this, I'm just conscious we might end up causing a bit of a hit and run problem if it gets popular with a lot of users.
Don't think a lot of users would notice uploads running while they are streaming, so a great opportunity to increase speeds for everyone else I guess.
Do you think we could have it as a config variable to enable it?
And would the best thing to do be to seed pieces at an equal priority to downloading, even to peers that aren't sending to us?
Matt Joiner
Nov 02 2017 12:23
I'm happy to make it the default behaviour if seeding is enabled, and dial it back with more options if problems arise.
I'm away for a few days, feel free to try with the obvious offending lines removed and submit a PR if it's satisfactory for you.
Bora M. Alper
Nov 02 2017 15:50
@anacrolix "You should be able to manufacture io.ByteScanner from io.Reader" I couldn't find how. :(
Nov 02 2017 20:50
@anacrolix , trying to understand your usage of filecache in confluence. Is it always using physical files?