Hi,
On Fri, 21 Dec 2007 16:58:57 +0100, vseguip@gmail.com wrote:
First, as a disclaimer, I'm a total Lisp noobie and have been playing with it recently poking here and there. I just tried Hunchentoot and was happy to see how easy it is to use. I also tried to make some preformance benchmarks on static files and compared it with lighttpd. Unsurprisingly lighttpd beat Hunchentoot quite badly, but I see there is still a lot of improvement for hunchentoot. I did some profiling and added a specialized handler that would serve static files using the linux sendfile system call which really improved the performance. Anyway I still see plenty room for improvements and I would like to take a stab at it, so I did some profiling.
Thanks for the code and the benchmarks, but currently I have no plans to integrate something like this into Hunchentoot.
First, the technical reasons:
1. This is a Linux-only feature, so it won't buy you anything on Windows or OS X. I hear FreeBSD has something similar, but you'll almost certainly need different code to cater to FreeBSD as well. Furthermore, from a quick glance at the first Google results for "sendfile" it is not clear to me if this will work with all filesystems supported by Linux and if it will work if you use a very old Linux installation.
2. Adding this to Hunchentoot in a reasonable way would imply adding FFI code for all supported Lisp implementations - or adding another dependency like CFFI. That's a lot of complexity for such a small improvement.
But, more importantly, the "philosophical" reason:
Do you have a real-world application that you'd like to use Hunchentoot for where you actually expect more than 250 requests per second? If so, it seems that you have a very successful business and I'd be happy to sign a support contract with you and add whatever feature you want to Hunchentoot. If not, I'd rather concentrate on bugfixes, interesting new features, and ease of use.
Improving the speed of static file serving on Linux has a very low priority for me and this will only change if someone convinces me that they can't use Hunchentoot for their project because of this particular omission.
Cheers, Edi.