mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-29 18:18:59 -04:00
OPTIM: http: set CF_READ_DONTWAIT on response message
strace shows a lot of EAGAIN on small response messages. This is caused by the fact that the READ_DONTWAIT flag is not set on response message, it's only there when we want to flush pending data. For small responses, it's a waste of CPU cycles to call recv() for nothing since most of the time, everything we'll need will be in the first response. Also, this will offer more opportunities for using splice() to transfer data.
This commit is contained in:
parent
ad38acedaa
commit
3f3997e6c6
1 changed files with 1 additions and 0 deletions
|
|
@ -5230,6 +5230,7 @@ int http_wait_for_response(struct session *s, struct channel *rep, int an_bit)
|
|||
}
|
||||
|
||||
channel_dont_close(rep);
|
||||
rep->flags |= CF_READ_DONTWAIT; /* try to get back here ASAP */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue