> From: Karl Fogel [mailto:[EMAIL PROTECTED]]
> Sent: 07 December 2001 19:42

> "Sander Striker" <[EMAIL PROTECTED]> writes:
> > > >   +    * Add a string "class" that combines a char* with a length
> > > >   +      and a reference count.  This will help reduce the number
> > > >   +      of strlen and strdup operations during request processing.
> > > 
> > > This doesn't belong in Apache, if anything it is an APR class.  BTW,
> > > this has come up multiple times, and everybody seems to be in favor
> > > or if.
> > > 
> > > Ryan
> > 
> > In subversion svn_string_t was introduced, because it wasn't in APR.
> > It does (AFAIK) exactly what brian describes.
> 
> Subversion's `svn_string_t' and `svn_stringbuf_t' don't have reference
> counts...
> 
> -Karl

True, and having a refcount would mean they would need to come out of some
global 'pool'.  The pool passed in for creation/duplication of the string
merely bumps the refcount and registers a 'string refcount decrease [delete
when zero]' cleanup.  At least, that is what pops in my mind at first thought.

Refcounts and pools are hairy... :)

Caching the strlen is a good start though.

Sander

Reply via email to