apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: cvs commit: httpd-2.0 ROADMAP
Date Fri, 07 Dec 2001 18:49:42 GMT
> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
> Sent: 07 December 2001 19:42

> "Sander Striker" <striker@apache.org> 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


Mime
View raw message