Bug 1524688: Part 64 - Reduce component manager allocations. r=froydnj

With most of the JS components converted to static registration, the string
arena and component hashtables are much smaller than the minimum space we
allocate for them.

Differential Revision: https://phabricator.services.mozilla.com/D18474

--HG--
extra : source : 81dc12cc9257ba9c8f2eef578d99b142220b37a3
extra : histedit_source : 6f64bcd954cbc4db6970acfb5ed81717c739d13f
This commit is contained in:
Kris Maglione 2019-01-30 16:55:45 -08:00
Родитель e086c4281c
Коммит 950939d55a
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -338,7 +338,7 @@ nsresult nsComponentManagerImpl::Create(nsISupports* aOuter, REFNSIID aIID,
return gComponentManager->QueryInterface(aIID, aResult);
}
static const int CONTRACTID_HASHTABLE_INITIAL_LENGTH = 128;
static const int CONTRACTID_HASHTABLE_INITIAL_LENGTH = 32;
nsComponentManagerImpl::nsComponentManagerImpl()
: mFactories(CONTRACTID_HASHTABLE_INITIAL_LENGTH),

Просмотреть файл

@ -269,7 +269,7 @@ class nsComponentManagerImpl final : public nsIComponentManager,
SHUTDOWN_COMPLETE
} mStatus;
mozilla::ArenaAllocator<1024 * 8, 8> mArena;
mozilla::ArenaAllocator<1024 * 1, 8> mArena;
struct PendingServiceInfo {
const nsCID* cid;