]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: task: split the tasklet vs task code in process_runnable_tasks()
authorWilly Tarreau <w@1wt.eu>
Tue, 24 Sep 2019 05:34:09 +0000 (07:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 24 Sep 2019 09:23:30 +0000 (11:23 +0200)
commitd66d75656e4d864595567d1c3bbaffbc515fb0a0
treeb4050c8418a873d4beef346bc51f60518c40904d
parent4c1e1ad6a8d1e9b72e8fac422db34c40207b7d8c
MINOR: task: split the tasklet vs task code in process_runnable_tasks()

There are a number of tests there which are enforced on tasklets while
they will never apply (various handlers, destroyed task or not, arguments,
results, ...). Instead let's have a single TASK_IS_TASKLET() test and call
the tasklet processing function directly, skipping all the rest.

It now appears visible that the only unneeded code is the update to
curr_task that is never used for tasklets, except for opportunistic
reporting in the debug handler, which can only catch si_cs_io_cb,
which in practice doesn't appear in any report so the extra cost
incurred there is pointless.

This change alone removes 700 bytes of code, mostly in
process_runnable_tasks() and increases the performance by about
1%.
include/proto/task.h
src/task.c