diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-06 18:52:27 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-06 18:52:27 +0200 |
commit | 01cdda8a65f76cc1270fa788aa0847a4d2d13ed7 (patch) | |
tree | 7d9a6676bdba7044a94a7a44c3f8976ec5f1149c /runtime | |
parent | 7fdeac0bdcaad3525f203ae5dc1fa7636078e37f (diff) | |
download | rsyslog-01cdda8a65f76cc1270fa788aa0847a4d2d13ed7.tar.gz rsyslog-01cdda8a65f76cc1270fa788aa0847a4d2d13ed7.tar.xz rsyslog-01cdda8a65f76cc1270fa788aa0847a4d2d13ed7.zip |
performance enhancement: much faster, up to twice as fast
(depending on configuration). This was a small change, but with big
results. There is more potential to explore, but the effects were so
dramatic that I think it makes sense to include this fix.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 13e7007a..ddff1bcf 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1452,11 +1452,11 @@ qqueueDequeueConsumable(qqueue_t *pThis, wti_t *pWti, int iCancelStateSave) * we have someone waiting for the condition (or only when we hit the watermark right * on the nail [exact value]) -- rgerhards, 2008-03-14 */ - if(iQueueSize < pThis->iFullDlyMrk) { + if(iQueueSize < pThis->iFullDlyMrk / 2) { pthread_cond_broadcast(&pThis->belowFullDlyWtrMrk); } - if(iQueueSize < pThis->iLightDlyMrk) { + if(iQueueSize < pThis->iLightDlyMrk / 2) { pthread_cond_broadcast(&pThis->belowLightDlyWtrMrk); } |