Disable WebWorkers by default

pull/1/head
yflory 7 years ago
parent bfb850554d
commit 6dc7e7eff4

@ -119,5 +119,12 @@ define(function() {
// You can use config.afterLogin to import these values in the users' drive.
//config.disableProfile = true;
// Disable the use of webworkers and sharedworkers in CryptPad.
// Workers allow us to run the websockets connection and open the user drive in a separate thread.
// SharedWorkers allow us to load only one websocket and one user drive for all the browser tabs,
// making it much faster to open new tabs.
// Warning: This is an experimental feature. It will be enabled by default once we're sure it's stable.
config.disableWorkers = true;
return config;
});

@ -906,7 +906,11 @@ define([
var msgEv = Util.mkEvent();
var postMsg, worker;
var noWorker = false;
var noWorker = AppConfig.disableWorkers || false;
if (localStorage.CryptPad_noWorkers) {
noWorker = localStorage.CryptPad_noWorkers === '1';
console.error('WebWorker/SharedWorker state forced to ' + !noWorker);
}
Nthen(function (waitFor2) {
if (Worker) {
var w = waitFor2();

Loading…
Cancel
Save