remove parsing reply in client_side.c

From: Adrian Chadd <>
Date: Wed, 24 Jan 2007 21:46:02 +0800

I've written a HttpReplyClone() routine that clones the given http reply.
It copies everything for now but it'll be easier to change to use
refcounted string semantics later on.

I then used it in client_side::clientBuildReply() which calls the http
parse routine on the given buffer. That buffer is the reply buffer which
-should- already be in mem->reply.

This benchmarks quite well on my p4 here - the 'ab' test fetching
anthony-box.gif (160 bytes) over and over jumped from 5300 req/sec to
6900 req/sec. It'll result in less CPU usage during HITs and MISSes
and be mostly visible on small object hits.

I'll commit this to squid-2-HEAD over the weekend if noone objects.
I'll try to tidy up clientBuildReply() a little further before I commit.

(Someone should probably port this to Squid-3 once I've finished tidying it
up. Squid-3 looks much the same in this respect, parsing the reply even
if the reply headers are in memory.)

Received on Wed Jan 24 2007 - 06:40:51 MST

This archive was generated by hypermail pre-2.1.9 : Thu Feb 01 2007 - 12:00:02 MST