Bump up the intial hash table size in a bunch of places to avoid resizing the hash later. r=scc

git-svn-id: svn://10.0.0.236/trunk@63690 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com 2000-03-22 02:43:48 +00:00
parent 0936aaafab
commit 6f132223fd
6 changed files with 7 additions and 7 deletions

View File

@ -111,7 +111,7 @@ nsGenericModule::nsGenericModule(const char* moduleName, PRUint32 componentCount
mModuleName(moduleName),
mComponentCount(componentCount),
mComponents(components),
mFactories(8, PR_FALSE),
mFactories(32, PR_FALSE),
mDtor(dtor)
{
NS_INIT_ISUPPORTS();

View File

@ -148,7 +148,7 @@ NS_COM nsIAtom* NS_NewAtom(const PRUnichar* us)
// Note: in a low memory condition, this routine could return |NULL|
{
if (nsnull == gAtomHashTable) {
gAtomHashTable = PL_NewHashTable(8, (PLHashFunction) HashKey,
gAtomHashTable = PL_NewHashTable(2048, (PLHashFunction) HashKey,
(PLHashComparator) CompareKeys,
(PLHashComparator) nsnull,
nsnull, nsnull);
@ -166,7 +166,7 @@ NS_COM nsIAtom* NS_NewAtom(const PRUnichar* us)
AtomImpl* id = new(us, uslen) AtomImpl();
if ( id )
{
PL_HashTableRawAdd(gAtomHashTable, hep, hashCode, id->mString, id);
PL_HashTableRawAdd(gAtomHashTable, hep, hashCode, id->mString, id);
NS_ADDREF(id);
}

View File

@ -50,7 +50,7 @@ nsPersistentProperties::nsPersistentProperties()
mIn = nsnull;
mSubclass = NS_STATIC_CAST(nsIPersistentProperties*, this);
mTable = PL_NewHashTable(8, (PLHashFunction) HashKey,
mTable = PL_NewHashTable(128, (PLHashFunction) HashKey,
(PLHashComparator) CompareKeys,
(PLHashComparator) nsnull, nsnull, nsnull);
}

View File

@ -111,7 +111,7 @@ nsGenericModule::nsGenericModule(const char* moduleName, PRUint32 componentCount
mModuleName(moduleName),
mComponentCount(componentCount),
mComponents(components),
mFactories(8, PR_FALSE),
mFactories(32, PR_FALSE),
mDtor(dtor)
{
NS_INIT_ISUPPORTS();

View File

@ -265,7 +265,7 @@ nsInterfaceInfoManager::indexify_file(const nsFileSpec *fileSpec)
}
// as many InterfaceDirectoryEntries as we expect to see.
#define XPT_HASHSIZE 64
#define XPT_HASHSIZE 512
#ifdef DEBUG_iim
static PRIntn

View File

@ -92,7 +92,7 @@ typedef struct XPTHashRecord {
struct XPTHashRecord *next;
} XPTHashRecord;
#define XPT_HASHSIZE 32
#define XPT_HASHSIZE 512
struct XPTHashTable { /* it's already typedef'ed from before. */
XPTHashRecord *buckets[XPT_HASHSIZE];