gitit icon indicating copy to clipboard operation
gitit copied to clipboard

efficiency issues for large pages

Open infinity0 opened this issue 14 years ago • 5 comments

If i create a large page (~60K) then gitit takes a very long time to generate it. top shows ~80-90% CPU usage by gitit.

infinity0 avatar Nov 28 '09 22:11 infinity0

after some experimenting i've managed to work out that it's a particular string that's making pandoc take ages to convert... i'll file a bug there instead.

infinity0 avatar Nov 28 '09 22:11 infinity0

It might be worth using System.Timeout.timeout to wrap the page conversion, so that if pandoc has one of its rare exponential moments, gitit can return a "page timed out" error instead of locking up the processor.

jgm avatar Nov 29 '09 16:11 jgm

i dunno how haskell works, but this sort of stuff could also be done in a separate thread (or equivalent) so that other requests from other users can be handled in the mean time?

infinity0 avatar Nov 29 '09 17:11 infinity0

happstack-server should do that anyway. But it's still bad to have one process that's taking up huge amounts of CPU for a long time, and it's bad for the user to request a page and have no response for a long time.

jgm avatar Nov 29 '09 18:11 jgm

Hi, I might have encountered this issue too. I think, I found server timeout hardcoded here: https://github.com/jgm/gitit/blob/0.12.2.1/gitit.hs#L92 . Is there a chance this will be settable by end user?

xmik avatar Jul 07 '17 16:07 xmik