I've just created a branch off of my Cacheboy tree and dumped in the
first set of changes relating to ref-counted strings into it.

They're not as useful and flexible as the end-goal we all want -
specifically, this pass just creates ref counted NUL-terminated C
strings, so creating references of regions of other strings / buffers
isn't possible. But it does mean that duplicating header sets (ie,
httpHeaderClone() I think?) becomes bloody cheap. The next move -
removing the requirement for the NUL-termination - is slightly hairer,
but still completely doable (and I've done it in a previous branch in
sourceforge, so I know whats required.) Thats when the real benefits
start to appear.

So far, so good. It turns out doing this as an intermediary step
worked out better than trying to replace the String code in its
entirety with replacement code which doesn't assume NUL terminated
strings.

http://code.google.com/p/cacheboy/source/list?path=/branches/CACHEBOY_HEAD_strref

This, and all the other gunk thats gone into cacheboy over the last
few months during the reorganisation and tidyup, still mostly
represents where I think Squid core codebase should have gone / should
be going at the present time.

Enjoy. :)


Adrian

Reply via email to