Bug 1443932 - part 2 - lower the default stack size for image decoder threads; r=tnikkel
authorNathan Froyd <froydnj@mozilla.com>
Wed, 07 Mar 2018 20:33:17 -0500
changeset 462134 18336fd064bd62d260ee771b82e7cc2e73059c0b
parent 462133 e98924c2ee353146521b663c3f413e0d7ab50169
child 462135 888f3dded1268a545694ec53f56293a42930dd4f
child 462155 5521f4a9012d88d6aa399bc16b27ec0013976526
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1443932
milestone60.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 1443932 - part 2 - lower the default stack size for image decoder threads; r=tnikkel These threads should not have deep stacks, and as we can have a number of them running simultaneously, it's beneficial to set the stack size to something reasonably low.
image/DecodePool.cpp
--- a/image/DecodePool.cpp
+++ b/image/DecodePool.cpp
@@ -304,17 +304,18 @@ bool DecodePoolImpl::CreateThread()
 {
   mMonitor.AssertCurrentThreadOwns();
   MOZ_ASSERT(mAvailableThreads > 0);
 
   bool shutdownIdle = mThreads.Length() >= mMaxIdleThreads;
   nsCOMPtr<nsIRunnable> worker = new DecodePoolWorker(this, shutdownIdle);
   nsCOMPtr<nsIThread> thread;
   nsresult rv = NS_NewNamedThread(mThreadNaming.GetNextThreadName("ImgDecoder"),
-                                  getter_AddRefs(thread), worker);
+                                  getter_AddRefs(thread), worker,
+                                  nsIThreadManager::kThreadPoolStackSize);
   if (NS_FAILED(rv) || !thread) {
     MOZ_ASSERT_UNREACHABLE("Should successfully create image decoding threads");
     return false;
   }
 
   mThreads.AppendElement(Move(thread));
   --mAvailableThreads;
   ++mIdleThreads;