--------------------- PatchSet 10420 Date: 2008/01/20 11:22:02 Author: adri Branch: s27_adri Tag: (none) Log: Default to 16k for the client socket for now; this saves on a reallocation. Members: src/client_side.c:1.202.2.9.4.44->1.202.2.9.4.45 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.202.2.9.4.44 retrieving revision 1.202.2.9.4.45 diff -u -r1.202.2.9.4.44 -r1.202.2.9.4.45 --- squid/src/client_side.c 20 Jan 2008 10:26:03 -0000 1.202.2.9.4.44 +++ squid/src/client_side.c 20 Jan 2008 11:22:02 -0000 1.202.2.9.4.45 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.202.2.9.4.44 2008/01/20 10:26:03 adri Exp $ + * $Id: client_side.c,v 1.202.2.9.4.45 2008/01/20 11:22:02 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -104,6 +104,8 @@ #define FAILURE_MODE_TIME 300 +#define INITIAL_SOCKET_BUF_SZ 16384 + /* Local functions */ static CWCB clientWriteComplete; @@ -188,7 +190,7 @@ { int ret; if (! in->inbuf) - in->inbuf = buf_create_size(4096); + in->inbuf = buf_create_size(INITIAL_SOCKET_BUF_SZ); ret = buf_changesize(in->inbuf, newsize); assert(ret); debug(33, 2) ("growing request buffer: size=%ld\n", (long) newsize); @@ -200,7 +202,7 @@ int size; statCounter.syscalls.sock.reads++; if (! in->inbuf) - in->inbuf = buf_create_size(4096); + in->inbuf = buf_create_size(INITIAL_SOCKET_BUF_SZ); size = buf_fill(in->inbuf, fd, 1); return size; } @@ -4723,7 +4725,7 @@ connState->me = me; connState->fd = fd; connState->pinning.fd = -1; - clientConnBufSetup(&connState->in, CLIENT_REQ_BUF_SZ); + clientConnBufSetup(&connState->in, INITIAL_SOCKET_BUF_SZ); comm_add_close_handler(fd, connStateFree, connState); if (Config.onoff.log_fqdn) fqdncache_gethostbyaddr(peer.sin_addr, FQDN_LOOKUP_IF_MISS);