diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-29 15:50:22 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-29 15:50:22 +0000 |
commit | 98ac7cd6811408be9b8dd7bc8f1c58a3851538dd (patch) | |
tree | 68386ad9ac6bbe4fe2760b3ca62947bc332e5458 /src/libserver/symbols_cache.c | |
parent | 1215965fbeaa507f9b717910d754c782a0a264c4 (diff) | |
download | rspamd-98ac7cd6811408be9b8dd7bc8f1c58a3851538dd.tar.gz rspamd-98ac7cd6811408be9b8dd7bc8f1c58a3851538dd.zip |
[Minor] Temporary disable scheduler optimization
It is not very well investigated and might decrease performance in some
cases I care about.
Diffstat (limited to 'src/libserver/symbols_cache.c')
-rw-r--r-- | src/libserver/symbols_cache.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c index 4d8f765cc..11eff0993 100644 --- a/src/libserver/symbols_cache.c +++ b/src/libserver/symbols_cache.c @@ -1278,8 +1278,6 @@ rspamd_symbols_cache_process_symbols (struct rspamd_task * task, gdouble total_microseconds = 0; const gdouble max_microseconds = 3e5; guint start_events_pending; - struct event *ev; - struct timeval tv; g_assert (cache != NULL); @@ -1352,9 +1350,12 @@ rspamd_symbols_cache_process_symbols (struct rspamd_task * task, if (total_microseconds > max_microseconds) { /* Maybe we should stop and check pending events? */ - if (rspamd_session_events_pending (task->s) == - start_events_pending) { + if (rspamd_session_events_pending (task->s) > start_events_pending) { /* Add some timeout event to avoid too long waiting */ +#if 0 + struct event *ev; + struct timeval tv; + rspamd_session_add_event (task->s, rspamd_symbols_cache_continuation, task, rspamd_symbols_cache_quark ()); @@ -1365,13 +1366,13 @@ rspamd_symbols_cache_process_symbols (struct rspamd_task * task, event_add (ev, &tv); rspamd_mempool_add_destructor (task->task_pool, (rspamd_mempool_destruct_t)event_del, ev); - } - - msg_info_task ("trying to check async events after spending " - "%d microseconds processing symbols", - (gint)total_microseconds); +#endif + msg_info_task ("trying to check async events after spending " + "%d microseconds processing symbols", + (gint)total_microseconds); - return TRUE; + return TRUE; + } } } |