&gt;I had a similar experience under Windows. Never really got to find out<br>
&gt;why it happened. You might try adding a short threadDelay call in your<br>
&gt;main loop and see what happens; I think it helped back then.<br><br>Wow... it&#39;s even worse. Even with a threadDelay of 1ms the FPS drop down to a chaotic 20~30.<br>I forgot to say: I run Ubuntu 10.10 (32bits), and I use HGL for the graphics, not GLFW. This may be important since HGL seems to react badly to threadDelay (The application simply blocks if there are no key pressed or mouse moved), so maybe the original problem comes from it.<br>
This is my main loop :<br><br><span style="font-family: courier new,monospace;">mainLoop :: H.Window -&gt; (Input -&gt; IO (H.Graphic, Bool)) -&gt; Time -&gt; IO ()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mainLoop win driver elapsed = do</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  clk &lt;- mkClock</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  threadDelay 1000</span>  <span style="font-family: courier new,monospace;"> -- in microseconds</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  events &lt;- whileJust (H.maybeGetWindowEvent win) return</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  (graphic, continue) &lt;- driver $ Input elapsed events</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  H.setGraphic win graphic</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  when continue $ do</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    el &lt;- clk</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    print $ round $ 1/el</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    mainLoop win driver el</span><br><br>Where<br>   data Input = Input Data.Time.Clock.NominalDiffTime [H.Event]<br><br>mkClock generates an IO action that, when evaluated, gives the time elapsed since mkClock.<br>
<br><br>&gt;Note that Param is essentially the same as<br>
&gt;combining the Simple variant with a reader monad layer, so it shouldn&#39;t<br>
&gt;affect the basic operation of the library.<br><br>Okay. It wasn&#39;t very likely the problem came from it.<br><br><br><div class="gmail_quote">2010/12/26 Patai Gergely <span dir="ltr">&lt;<a href="mailto:patai_gergely@fastmail.fm">patai_gergely@fastmail.fm</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">&gt; I keep on experimenting with Elerea. I&#39;m on my way to achieve a simple<br>

&gt; Pong<br>
&gt; game, but the display is awfully jerky, however the sampling occurs on<br>
&gt; average every 0,0015 sec, which gives 670 FPS.<br>
</div>I had a similar experience under Windows. Never really got to find out<br>
why it happened. You might try adding a short threadDelay call in your<br>
main loop and see what happens; I think it helped back then.<br>
<div class="im"><br>
&gt; All the elerea-examples run perfectly fine on my computer, however I use<br>
&gt; FRP.Elerea.Param, which none of the examples use. But there isn&#39;t no<br>
&gt; known problem with Param?<br>
</div>Haven&#39;t heard of any. Note that Param is essentially the same as<br>
combining the Simple variant with a reader monad layer, so it shouldn&#39;t<br>
affect the basic operation of the library.<br>
<br>
Gergely<br>
<font color="#888888"><br>
--<br>
<a href="http://www.fastmail.fm" target="_blank">http://www.fastmail.fm</a> - Same, same, but different...<br>
<br>
</font></blockquote></div><br>