webtorrent / create-torrent

Create .torrent files
https://webtorrent.io
MIT License
341 stars 94 forks source link

fix: use for-await instead of the blockstream and multistream packages #115

Closed KayleePop closed 2 years ago

KayleePop commented 4 years ago

very similar to https://github.com/webtorrent/webtorrent/pull/1832

this allows the multistream, blockstream2, and once dependencies to be dropped

Compatibility shouldn't be an issue https://caniuse.com/#search=for%20await (and node >=10)

Arman92 commented 4 years ago

If this PR fixes issues of premature close, would you please review and merge? @PopTudor

DiegoRBaquero commented 3 years ago

@KayleePop willing to rebase? happy to review then

KayleePop commented 3 years ago

@DiegoRBaquero rebased :+1:

note that this is no longer the same behavior as master (since backpressure was added), before the rebase, this PR did infinite parallelism (just like master at the time), but now it has no parallelism (master does 5 hashes at a time in parallel).

Adding a buffer to get the same behavior wouldn't be worth it, since the whole point of this PR is to simplify code.

I honestly doubt it makes a practical difference in terms of performance, but I didn't test it.

github-actions[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

ThaUnknown commented 2 years ago

superseded by https://github.com/webtorrent/create-torrent/pull/185