mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
[OPTIM] task: don't scan the run queue if we know it's empty
It happens quite often in fact, so let's save those precious cycles.
This commit is contained in:
parent
576132e533
commit
98c6121ee5
@ -196,6 +196,10 @@ void process_runnable_tasks(int *next)
|
||||
run_queue_cur = run_queue; /* keep a copy for reporting */
|
||||
nb_tasks_cur = nb_tasks;
|
||||
max_processed = run_queue;
|
||||
|
||||
if (!run_queue)
|
||||
return;
|
||||
|
||||
if (max_processed > 200)
|
||||
max_processed = 200;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user