diff options
author | KayleePop <34007889+KayleePop@users.noreply.github.com> | 2018-08-26 22:33:05 +0300 |
---|---|---|
committer | KayleePop <34007889+KayleePop@users.noreply.github.com> | 2018-08-27 21:45:26 +0300 |
commit | 1479c3a422f4727f42a06e45269bea6024be262e (patch) | |
tree | 3d8d2d74d5a01f57d13d29e8a39ff10c9cbc52a5 /lib | |
parent | 124fc9fe680f9d13e38b48b5d4ae8cfc3fce0a2a (diff) |
Remove the concurrency limit in the browser
IndexedDB chunk stores benefit from maximum concurrency
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 0229e32..610b280 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -45,7 +45,8 @@ const PIPELINE_MAX_DURATION = 1 const RECHOKE_INTERVAL = 10000 // 10 seconds const RECHOKE_OPTIMISTIC_DURATION = 2 // 30 seconds -const FILESYSTEM_CONCURRENCY = 2 +// IndexedDB chunk stores used in the browser benefit from maximum concurrency +const FILESYSTEM_CONCURRENCY = process.browser ? Infinity : 2 const RECONNECT_WAIT = [ 1000, 5000, 15000 ] |