Would cut down copying and syscalls compared to the current system. The main bottleneck is HTTPConnectionWriteChunkFile, which is called once per result by the blog interface. For the best case (files under 8K) it looks like this:
switch to thread pool
open
read (returns <8K)
read (returns 0)
close
return from thread pool
writev
I guess sendfile would only eliminate the writev?
Maybe mmap caching is a better approach after all...
Would cut down copying and syscalls compared to the current system. The main bottleneck is
HTTPConnectionWriteChunkFile
, which is called once per result by the blog interface. For the best case (files under 8K) it looks like this:I guess sendfile would only eliminate the writev?
Maybe mmap caching is a better approach after all...