[web-devel] gitit performance: happstack vs yesod

John MacFarlane jgm at berkeley.edu
Sat Jul 7 18:27:20 CEST 2012

Never mind -- I've traced the slowness to a difference unrelated
to happstack and Yesod.  Once I get this sorted out, I'll post here about
the new benchmarks.


+++ John MacFarlane [Jul 06 12 19:50 ]:
> I've been working on a port of gitit to Yesod, which is currently called
> gitit2 (https://github.com/jgm/gitit2). At this point I have implemented
> most of the basic wiki functionality.
> I've really been enjoying some of Yesod's features -- especially the
> type-safe URLs, form support, internationalization, and widgets -- and
> the code is much cleaner and shorter than the original gitit code.
> But today I thought I'd look at performance, and I was surprised to
> find that gitit2 is considerably slower than the original gitit (built
> on happstack). For example, on one simple test page, siege recorded 9
> transactions per second for gitit2, 18 for the original gitit. (This is
> with caching turned off, so each hit involves getting content from the
> git repository, parsing it, and creating an HTML wiki page. Of course
> most of that work is done by filestore and pandoc, which are used
> by both gitit and gitit2.)
> I'm really curious why gitit2 is so much slower, and I wonder whether
> I'm making some basic mistake. At this point most of the code is in one
> module, https://github.com/jgm/gitit2/blob/master/Network/Gitit2.hs .
> This defines a Yesod subsite which is wrapped by a Yesod site in the
> main executable, https://github.com/jgm/gitit2/blob/master/src/gitit2.hs
> . The benchmark I did just involved fetching the front page, so most
> of the handlers are irrelevant. If anyone has any useful ideas, I'd be
> grateful.
> John
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

More information about the web-devel mailing list