Re: SBuf review

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 19 Sep 2008 18:21:02 +1200

Adrian Chadd wrote:
> 2008/9/19 Amos Jeffries <squid3_at_treenet.co.nz>:
>
>> I kind of fuzzily disagree, the point of this is to replace MemBuf + String
>> with SBuf. Not implement both again independently duplicating stuff.
>
> I'll say it again - ignore MemBuf. Ignore MemBuf for now. Leave it as
> a NUL-terminated dynamic buffer with some printf append like
> semantics.
>
> When you've implemented a non-NUL-terminated ref-counted memory region
> implementation and you layer some basic strings semantics on top of
> it, you can slowly convert or eliminate the bulk of the MemBuf users
> over.
>
> You're going to find plenty of places where the string handling is
> plain old horrible. Don't try to cater for those situations with
> things like "NULL strings". I tried that, its ugly. Aim to implement
> something which'll cater to something narrow to begin with - like
> parsing HTTP headers - and look to -rewrite- larger parts of the code
> later on. Don't try to invent things which will somehow seamlessly fit
> into the existing code and provide the same semantics. Some of said
> semantics is plain shit.

Exactly what I meant by that quoted statement. Most of MemBuf usage is
being abused. Should not be kept.

>
> I still don't get why this is again becoming so freakishly complicated.

It's not, the arguments are just getting long is all.

Amos

-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE9
Received on Fri Sep 19 2008 - 06:21:14 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 19 2008 - 12:00:04 MDT