Bug 1362786 - (1) Increase subprocess BUFFER_SIZE r?kmag
While 4KiB is a decently sized buffer, bumping it to 32 on my
machine reduced the time for getSymbolsFromNM from 12s to 8s. If
32 is too large for the typical use of this, then we can instead
just parameterize this so that we can specify as large a buffer
as we want for our use case.
MozReview-Commit-ID: 3wGpHzQ9uZ5
--- a/toolkit/modules/subprocess/subprocess_common.jsm
+++ b/toolkit/modules/subprocess/subprocess_common.jsm
@@ -20,17 +20,17 @@ XPCOMUtils.defineLazyModuleGetter(this,
XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
"resource://gre/modules/Timer.jsm");
Services.scriptloader.loadSubScript("resource://gre/modules/subprocess/subprocess_shared.js", this);
/* global SubprocessConstants */
var EXPORTED_SYMBOLS = ["BaseProcess", "PromiseWorker", "SubprocessConstants"];
-const BUFFER_SIZE = 4096;
+const BUFFER_SIZE = 32768;
let nextResponseId = 0;
/**
* Wraps a ChromeWorker so that messages sent to it return a promise which
* resolves when the message has been received and the operation it triggers is
* complete.
*/