mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
core: use size of 32 for hashtables (instead of 4, 8 or 16)
A size of 32 will use a little more memory but will reduce collisions in key hashs, and then length of linked lists inside hash structure (faster search in hashtable).
This commit is contained in:
@@ -556,7 +556,7 @@ script_action_install (int quiet)
|
||||
NULL);
|
||||
if (filename)
|
||||
{
|
||||
options = weechat_hashtable_new (8,
|
||||
options = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
@@ -986,7 +986,7 @@ script_action_show (const char *name, int quiet)
|
||||
".repository");
|
||||
if (filename)
|
||||
{
|
||||
options = weechat_hashtable_new (8,
|
||||
options = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
|
||||
@@ -1123,7 +1123,7 @@ script_repo_file_read (int quiet)
|
||||
|
||||
if (!script_repo_max_length_field)
|
||||
{
|
||||
script_repo_max_length_field = weechat_hashtable_new (16,
|
||||
script_repo_max_length_field = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_INTEGER,
|
||||
NULL,
|
||||
@@ -1181,7 +1181,7 @@ script_repo_file_read (int quiet)
|
||||
locale_language = strdup (locale);
|
||||
}
|
||||
|
||||
descriptions = weechat_hashtable_new (8,
|
||||
descriptions = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
@@ -1457,7 +1457,7 @@ script_repo_file_update (int quiet)
|
||||
if (!filename)
|
||||
return;
|
||||
|
||||
options = weechat_hashtable_new (8,
|
||||
options = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
|
||||
@@ -128,7 +128,7 @@ script_get_loaded_plugins_and_scripts ()
|
||||
/* get loaded scripts */
|
||||
if (!script_loaded)
|
||||
{
|
||||
script_loaded = weechat_hashtable_new (16,
|
||||
script_loaded = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user