On Sun, Mar 25, 2001, Adrian Chadd wrote:
> The trick here is to be able to delete an entire directory of
> objects whilst deleting the relevant StoreEntry's. We can't lookup
> a StoreEntry by swap_filen since the current index is by method/URL.
> Can anyone think of a neat way to purge an entire directory
> of objects *AND* the StoreEntry's of those objects at the same
> time?
>
> If we manage to do this, we'd be able to save quite a few bytes off
> the StoreEntry struct..
.. if we know how many objects we can *possibly* squeeze into
a "bucket" (might as well call a collection of objects in a
directory a 'bucket of objects'), we can pre-malloc a chunk of
memory for the StoreEntry's inside that bucket.
That way, when we want to go ahead and kill an entire bucket of
StoreEntry's, we can just take the memory block,
walk each StoreEntry (since they're just one after another, we
could index them like an array..) and call storeRelease() on
them.
Voila!
.. i think. Do people see any nasty holes in this?
It would solve any per-storeentry overhead we might have
right now allocating them either with malloc or through
a stack via the mempools, and it would mean we can quite
happily kill any replacement list info in the StoreEntry
itself.
Comments?
Adrian
-- Adrian Chadd "The fact you can download a 100 megabyte file <adrian@creative.net.au> from half way around the world should be viewed as an accident and not a right." -- Adrian Chadd and Bill FumerolaReceived on Sat Mar 24 2001 - 13:59:09 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:40 MST