[Haskell-cafe] Happstack: serveDirectory vs serveFile

Semen Trygubenko / Семен Тригубенко semen at trygub.com
Fri Jan 23 16:09:52 UTC 2015


Dear all,

I've ran a simple benchmark where two serve functions
were side-by-side in an msum and looked like

dirs "hehe"     $ serveDirectory DisableBrowsing [] "/hehe"
dirs "favicon.ico" $ serveFile (asContentType "image/x-icon") "favicon.ico"

"hehe" directory also contained file "favicon.ico".

This is happstack server version 7.3.9.

I've been hammering it with ab and confirmed this puzzling result:
it seems that serveFile route is approximately
two orders of magnitude slower than serveDirectory route...

Will be grateful for any clues as to what I'm doing wrong!

Thanks,
S.


-- 
Семен Тригубенко http://trygub.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20150123/1c390b76/attachment.sig>


More information about the Haskell-Cafe mailing list