Reducing CPU load when using Helm

Forwarding this to haskell-cafe as it failed before.
On 18 August 2014 20:24, Kaspar Emanuel
Hi,
are there some simple tricks to reduce the CPU load? This simple square rendering sits at 20% CPU even when the window size remains constant.
import FRP.Helm import qualified FRP.Helm.Window as Window
render :: (Int, Int) -> Element render (w, h) = collage w h [move (100, 100) $ filled red $ square 64]
main :: IO () main = do engine <- startup defaultConfig run engine $ render <~ Window.dimensions engine
The binary fractal tree I submitted in another thread on helm-dev sits at 100% CPU when the mouse isn't moving. It seems to me that Helm keeps re-drawing and re-computing when it doesn't need to.
I started digging through the source a bit but it will take me a while to understand Elerea and how it samples the inputs and causes things to update.
Are there any quick fixes?
Ciao,
Kaspar
participants (1)
-
Kaspar Emanuel