]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
filePosix.c: Increased the hash table size for better performance.
authorJohn Wolfe <jwolfe@vmware.com>
Tue, 21 Dec 2021 20:48:49 +0000 (12:48 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Tue, 21 Dec 2021 20:48:49 +0000 (12:48 -0800)
Improved the performance of the functions File_ListDirectory() and
File_WalkDirectoryStart().

open-vm-tools/lib/file/filePosix.c

index 8cbf4153dcab9e72652276e3f220331d4124025f..ee36700ea9ee9f3e454f4a7e97d1c0dac597a849 100644 (file)
@@ -2996,7 +2996,7 @@ File_WalkDirectoryStart(const char *dirName)  // IN:
    context = Util_SafeMalloc(sizeof *context);
 
    context->dirName = Util_SafeStrdup(dirName);
-   context->hash = HashTable_Alloc(256, HASH_STRING_KEY, NULL);
+   context->hash = HashTable_Alloc(2048, HASH_STRING_KEY, NULL);
    context->dir = Posix_OpenDir(dirName);
 
    if (context->dir == NULL) {