Bug 1362786 - (1) Increase subprocess BUFFER_SIZE r=kmag
authorDoug Thayer <dothayer@mozilla.com>
Fri, 21 Jul 2017 10:20:36 -0700
changeset 422324 242a12eae20e469b3d8e6cfdc0ae34f9a1752c5d
parent 422323 1c8d22359d5d1bd24fae209631deabf8d1a0fc82
child 422325 71b419e1788dd017f3f3fe6bf76ae04115698a66
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1362786
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
toolkit/modules/subprocess/subprocess_common.jsm
--- 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.
  */