Closed Tryptophan closed 5 years ago
The fix was actually in specifying an announceList in the client.seed()
function, looking something like this:
let announceList = [['wss://tracker.openwebtorrent.com']];
this.client.seed(buffer, { announceList }, (torrent) => {
...
});
alright, so setting just 1 tracker reduces the performance issue ?
That's what I've noticed at least, yes.
It would make sense as it's few connection less, and a few messages less on the WS pipe. How is it performance wise aside from that ? Did you try the "p2p" locally between 2 browsers ? (browser + browser incognito does the job)
The performance on your demo works perfectly, I was just wondering how you got it like that as I was implementing something similar with webtorrent and found using a single tracker like your demo helped.
thanks a lot for the feedback, I'll amend the readme to reflect that behaviour :)
I've been playing around with chunking a stream of video/audio data into many torrents in the browser with WebTorrent, but have run into issues where calling
client.seed()
andclient.remove()
many times in the span of a few seconds has caused performance issues. Would sending the binary data to a web worker thread and doing the torrent work there fix this? I've been looking around the code, but I'm still unsure how your solution works.