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