When I wrote
Of course I did no benchmarks (*gg*) but things feel much snappier now, and that’s all that counts.
I somehow knew that it would not take very long until the benchmarks would arrive. Actually, it took a whole day until it happened :-)
So, here are some quick benchmarks:
The gallery home page
This page contains several albums, a random image block and the default layout. The first chart contains requests per second, the second sets the values without X-Sendfile values to 100 % and compares them with the X-Sendfile enabled numbers.
As you can easily see, even on PHP-heavy pages with not that many pictures, the throughput increases by around 7 percent when using X-Sendfile. But even more important is the use of XCache, which gives you around 200 percent!
Now let's have a look at a
Serving a single image (with security checks)
The tested image was inside a protected area which requires the user to log-in, so Gallery is not able to utilize its fast-path mechanism for pictures which don't require any security checks.
Now that's impressing, isn't it? XCache gives you over 4 times as many requests/s! And X-Sendfile increases that number by around 30 percent.
All tests were conducted on my pretty slow (VMware) server, so the interesting stuff here is the percentages, not the absolute numbers. The numbers are from Apache's ab with 20 concurrent requests and 100 requests total.
Conclusion: XCache (or some other bytecode cache) is a absolute must for Gallery (as well as for any heavily object-oriented PHP application, especially when using AJAX together with OO frameworks - but that's another story).
X-Sendfile speeds the whole thing up even more and increases the responsiveness of your Gallery to give the user a smooth browsing experience (there's nothing more annoying than to wait for pictures on a slide slow).