зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322435. Limit the number of image decoding threads we use in the parent process. r=aosmond
There aren't as many images in chrome to decode, and they aren't as big, so we don't need as many threads.
This commit is contained in:
Родитель
a13d957952
Коммит
04b319ae6d
|
@ -16,6 +16,7 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "prsystem.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
#include "gfxPrefs.h"
|
||||
|
||||
|
@ -261,6 +262,11 @@ DecodePool::DecodePool()
|
|||
if (limit > 32) {
|
||||
limit = 32;
|
||||
}
|
||||
// The parent process where there are content processes doesn't need as many
|
||||
// threads for decoding images.
|
||||
if (limit > 4 && XRE_IsParentProcess() && BrowserTabsRemoteAutostart()) {
|
||||
limit = 4;
|
||||
}
|
||||
|
||||
// Initialize the thread pool.
|
||||
for (uint32_t i = 0 ; i < limit ; ++i) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче