Here are some links that give a little background:

http://hackage.haskell.org/trac/ghc/ticket/2284
http://www.haskell.org/pipermail/glasgow-haskell-users/2008-May/014739.html

Unfortunately I can't explain it better myself.

I'm in the same situation as Axel: utterly perplexed that you would have acceptable performance in ghci but not a compiled program.

John

2010/11/25 Herng Yi Cheng <herngyi@gmail.com>
It's a lot less jerky, but still unacceptably so. What is "-fno-state-hack"? I find nothing when I google it.

regards,
Herng Yi


Date: Thu, 25 Nov 2010 15:22:35 +0000

Subject: Re: [Gtk2hs-users] Gtk2hs, HOpenGL and Progress Bars
From: jwlato@gmail.com
To: herngyi@gmail.com
CC: Axel.Simon@in.tum.de; gtk2hs-users@lists.sourceforge.net


Hi,

On Thu, Nov 25, 2010 at 12:05 PM, Axel Simon <Axel.Simon@in.tum.de> wrote:
Hi Herng Yi,


On 25.11.2010, at 12:34, Herng Yi Cheng wrote:

The HOpenGL problem wasn't solved, though - I tried compiling with -threaded, -threaded -O, -threaded -O2 and even used +RTS -N2 -RTS for runtime options, but the polyhedron rotation is still jerky and mostly unresponsive.

That is really odd since you say that it is fluent in ghci. The only difference between the two should be removed by the -threaded flag.

Does it work if you compile your program with "-fno-state-hack"?

John