From 4a79d0e82a5e2040e8dd5d4b8fb12fbf4672d8ce Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 5 Apr 2009 20:12:44 +0400 Subject: * Add per-task regexp results cache, that would optimize regexp engine performance by avoiding multiply match of the same regexp --- src/worker.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/worker.c') diff --git a/src/worker.c b/src/worker.c index 1f1548dd1..20e04ed5e 100644 --- a/src/worker.c +++ b/src/worker.c @@ -274,6 +274,8 @@ accept_socket (int fd, short what, void *arg) memory_pool_add_destructor (new_task->task_pool, (pool_destruct_func)rcpt_destruct, new_task); new_task->results = g_hash_table_new (g_str_hash, g_str_equal); memory_pool_add_destructor (new_task->task_pool, (pool_destruct_func)g_hash_table_destroy, new_task->results); + new_task->re_cache = g_hash_table_new (g_direct_hash, g_direct_equal); + memory_pool_add_destructor (new_task->task_pool, (pool_destruct_func)g_hash_table_destroy, new_task->re_cache); worker->srv->stat->connections_count ++; -- cgit v1.2.3