Re: fixing >4k reply header store reads

From: Adrian Chadd <adrian@dont-contact.us>
Date: Wed, 9 Jan 2008 11:30:47 +0900

On Tue, Jan 08, 2008, Henrik Nordstr?m wrote:

> > Now, that should work, but its inefficient. Really guys, reading 4k is about
> > as fast as reading 64k from a unix filesystem disk, so we should probably
> > modify the store to do -that-.
>
> I am fine with that, provided the buffer is released. However, releasing
> that buffer do not work very well with your refcounted strings..
>
> But maybe you'll find some clever way doing this with a chain of
> refcounted buffers..

You don't need to release the buffer. Whats the difference in having
a 4k buffer of reply status, headers and body with 300 odd bytes
of metadata, versus ~4k worth of allocated strings representing the reply
status and headers? probably 300 bytes.

Since header entries are released all at once when the mem object
is destroyed then we don't lose out on RAM. We actually are more
efficient, we don't need to malloc/free rounded-up-string-buffer-size
blocks..

Adrian
Received on Tue Jan 08 2008 - 19:21:44 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST