diff --git a/README.md b/README.md index 13f18400..b24138dc 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,9 @@ same order here too * [Chrome issue 1352210](https://bugs.chromium.org/p/chromium/issues/detail?id=1352210) -- plaintext http may be faster at filehashing than https (but also extremely CPU-intensive) +* [Chrome issue 383568268](https://issues.chromium.org/issues/383568268) -- filereaders in webworkers can OOM / crash the browser-tab + * copyparty has a workaround which seems to work well enough + * [Firefox issue 1790500](https://bugzilla.mozilla.org/show_bug.cgi?id=1790500) -- entire browser can crash after uploading ~4000 small files * Android: music playback randomly stops due to [battery usage settings](#fix-unreliable-playback-on-android) diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index 4f2e2f21..afd0db9c 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -1359,7 +1359,15 @@ function up2k_init(subtle) { draw_each = good_files.length < 50; if (WebAssembly && !hws.length) { - for (var a = 0; a < Math.min(navigator.hardwareConcurrency || 4, 16); a++) + var nw = Math.min(navigator.hardwareConcurrency || 4, 16); + + if (CHROME) { + // chrome-bug 383568268 // #124 + nw = Math.max(1, (nw > 4 ? 4 : (nw - 1))); + nw = (subtle && !MOBILE && nw > 2) ? 2 : nw; + } + + for (var a = 0; a < nw; a++) hws.push(new Worker(SR + '/.cpr/w.hash.js?_=' + TS)); if (!subtle)