Hello cafe! I'm having some performance issues trying to use gloss to make animations where each "model" step is relatively time expensive. I'm using the IO.Simulate module because my step function needs to do an IO operation which takes around 1 second (it may vary).
I will try to give some details. I have the step function: step :: Model -> IO Model step m = do ... p <- slowOperation ... return newModel The rest of the program is small and simple. The drawing function (Model -> IO Picture -- it is pure though) is as quick as simple. However, the program get stuck after the first iteration. In the other hand, I am using the animateIO function which ask me for an Int value to set up "the number of simulation steps to take for each second of real time". But I'm more interested in the animation waiting for the simulation step to end. Does it make sense? I would be really thankful with any pointer here. Thanks in advance, Daniel Díaz.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe