From a9866aa8c1fa540587f90ed1668d3a438e5e23e8 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Fri, 22 Jul 2011 12:29:07 +0400 Subject: [PATCH] Optimization in event_process_active(): ignore maxcb & endtime for highest priority events. --- event.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/event.c b/event.c index 0221ce2a..baaef8cd 100644 --- a/event.c +++ b/event.c @@ -1439,8 +1439,12 @@ event_process_active(struct event_base *base) for (i = 0; i < base->nactivequeues; ++i) { if (TAILQ_FIRST(&base->activequeues[i]) != NULL) { activeq = &base->activequeues[i]; - c = event_process_active_single_queue(base, activeq, - maxcb, endtime); + if (i == 0) + c = event_process_active_single_queue(base, activeq, + INT_MAX, NULL); + else + c = event_process_active_single_queue(base, activeq, + maxcb, endtime); if (c < 0) return -1; else if (c > 0) -- 2.40.0