httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <>
Subject Re: AW: [PATCH] mod_disk_cache: store/read array & table
Date Tue, 24 Jan 2006 17:27:20 GMT
Plüm wrote:

> To be honest I do not understand why Brian creates its own buffered
> input / output reading. I think that header files are rarely larger than 4K.
> And the current code already buffers 4K when APR_BUFFERED is set as a flag for
> apr_file_open (which is set).

in current mod_disk_cache:

-copy from OS buffer (OS may copy from disk) into apr_file_t buffer
-copy from apr_file_t buffer to user's buffer (apr_file_gets etc.)
-use apr_table_set and add or apr_pstrdup(this makes a copy of the string).

So 3 copies of same data and several allocations (apr_pcalloc, etc)

In my meta_file:
-copy from OS buffer (OS may copy from disk) into meta_file_t buffer
-use apr_table_setn and addn

only 1 copy and 1 apr_pcalloc (or equivalent)

Brian Akins
Lead Systems Engineer
CNN Internet Technologies

View raw message