[web-devel] Content-Length on sendFile
michael at snoyman.com
Wed Jun 15 08:59:57 CEST 2011
On Wed, Jun 15, 2011 at 6:51 AM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
>> I'm really starting to think that the correct solution for this use
>> case really is embedded files. It avoids any kind of system call
>> overhead, doesn't touch the hard drive at all, and doesn't allow for
>> modification of the files after compile time. It would be interesting
>> to see if it ends up faster than sendfile.
> This is just my idea. Not confirmed.
> The server saves all embedded files to the file sytem on boot time and
> obtains file descriptors for them. And it *unlink* files so that
> nobody but the server can touch. Then the server can send the file
> with sendfile. (sendfile API should take FD not FilePath)
Is this to get the increased performance of the sendfile system call?
I very much doubt it would work out faster. With embedded files, the
entire static file is stored as a contiguous chunk of memory. It's
worth an analysis before recommending this approach, of coruse.
> web-devel mailing list
> web-devel at haskell.org
More information about the web-devel