Re: string -> refcounted string -> buffer referencing

From: Gonzalo Arana <gonzalo.arana@dont-contact.us>
Date: Tue, 11 Dec 2007 18:20:30 -0300

On Dec 9, 2007 2:57 AM, Adrian Chadd <adrian@creative.net.au> wrote:
> This should explain why I'd like to get Squid-2.7 tagged and out the door
> so I can continue development.
>
> I'm well into changing Squid-2's string handling to take advantage of reference
> counting and it works - there's plenty of stringDup() calls in the main path
> now (especially when cloning the reply headers during client replies) but
> the allocator CPU savings have been eaten by the requirement for a seperate
> buffer header structure to be reference counted.

<snip>

> Finally, once all the above is done and stable, the http header parsing routines
> can be modified to create buffer references rather than creating new strings -
> this should then give noticable CPU and memory footprint gains.

In the meantime, seems that squid2 may be optimized a little, simply by avoiding
expensive memset calls from memPoolFree. I've filed a bug for this enhancement:
http://www.squid-cache.org/bugs/show_bug.cgi?id=2137
My test need verification, as my squid box was not a dedicated on
(actually I run it on
my desktop PC). I've tested only under Linux.

Regards,

-- 
Gonzalo A. Arana
Received on Tue Dec 11 2007 - 14:20:36 MST

This archive was generated by hypermail pre-2.1.9 : Mon Dec 31 2007 - 12:00:03 MST