httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: buckets
Date Sat, 22 Jul 2000 03:58:09 GMT

> As I mentioned earlier.  So since it's only legacy modules that leave
> all these extra brigades lying around, I guess we just don't care,
> right?


> >Yes, it would make sense.  But, it keeps us from creating a list of
> empty
> >buckets that can be re-used.  ...  The other option is to have both
> create
> >functions, but that just makes the API a bit less clean.
> Since you say you don't like it, I guess it's not worth me finishing
> it... I still would like to be able to do the above (insert the data
> without the extra call), but if you say you've got some macro magic to
> make it at least look friendlier, that's a start.

I'm not sure what the macros would do for this, but I have just begun to
think about this, so I still need to think about it more.

> The patch wouldn't have stopped you from creating empty buckets, by the
> way... you can pass in NULL as the data, and you get an empty bucket,
> just like before.  It would look nicer in that case to have a function
> you could use that didn't require you to give it a bunch of NULL
> parameters.  It'd be a toss up as to whether one function that requires
> parameters that are unneeded in some cases would make the API less clean
> or having two functions (one would likely just be a wrapper around the
> other anyway) would make the API less clean.  I could be convinced
> either way.
> >This is an optimization that we can make later.  
> I don't suppose you could be convinced to like one or the other right
> now, then?  Since it's an API optimization, not a speed optimization,
> I'd have thought it would be better to work it out sooner than later in
> order to facilitate use of the buckets.  I only started on this whole
> sequence of questions in the first place because of your repeated
> comments in the code that the API needed to be cleaned up...  You tell
> me.

I'm not sure we are talking about the same thing.  :-)  No shock there.

Basically, the optimization I see, is being able to keep a list of buckets
that were created but are now empty.  Then, when we need a new bucket, we
can grab that bucket off the free list instead of allocating a new
bucket.  This also keeps us from having to free the bucket.

The API is going to look one of two ways.

1)  ap_create_bucket()

2)  ap_create_bucket(...)

I am not sure which is better, but I personally like the idea of having
one way to create a bucket and one way to insert data.

The API clean-ups I wanted in the code, you have already done actually.  I
will try to go in and clean up those comments.  Basically, the append
functions and removing the list functions did everything I was talking

Now, I am stopping for the night.  :-)


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message