Re: Why would you use generic_cbdata ?

From: Adrian Chadd <adrian@dont-contact.us>
Date: Mon, 9 Oct 2000 15:49:04 +0800

On Sun, Oct 08, 2000, Duane Wessels wrote:
>
>
> On Mon, 9 Oct 2000, Adrian Chadd wrote:
>
> >
> > I'm peering through some of the calloc/malloc's and I came across
> > the generic_cbdata struct. Is there a reason why you WOULDN"T want
> > to stick something in the cbdata list?
>
> Yes, there is a reason.
>
> The way things work, you add must add all pointers of the same "type"
> to the cbdata. So, for example, every ConnectStateData that gets
> created is added, every clientHttpRequest is added, etc.
>
> There is some overhead to searching the cbdata hash, so we want to keep it
> as small as possible.

Aha! Ok, that makes sense. However, in the New World Order(tm) the unified
mempools and cbdata code thats in squidng might render this a little
defunct.

What I will do then is convert generic_cbdata to a mempool for the time being,
satisfying my aim of chopping things up into mempools, and then when we hit
2.5 and the cbdata+mempool code goes into squid-HEAD I'll look at removing it
(and the number of StoreEntry's will go away too with some other patches people
have, but that is a little way down the track. :-)

Thanks for the feedback,

Adrian

-- 
Adrian Chadd			"If a butterfly flaps its wings in China,
<adrian@creative.net.au>	    will a woman get naked in Amsterdam?"
				      -- Ashley Penney on Chaos Theory
Received on Mon Oct 09 2000 - 01:49:18 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:41 MST