javascript - how to increase performance?
<pre><code>&lt;script&gt;
     function mySlide()
     {
        var myFx = new Fx.Slide('my-slide', {
            duration: 1000,
            transition: Fx.Transitions.Pow.easeOut
        });

        //Toggles between slideIn and slideOut twice:
        myFx.toggle().chain(myFx.toggle);

     }

     var interval = null;

     function clearTime()
     {
        $clear(interval);
     }

     function play()
     {
        interval = mySlide.periodical(1000);
     }
&lt;/script&gt;
&lt;div onclick="clearTime();"&gt; stop &lt;/div&gt;
&lt;div onclick="play();"&gt; play &lt;/div&gt;
&lt;img id="my-slide" src="http://lh5.ggpht.com/_8Nsej4QeRGg/TE5m5zRf4bI/AAAAAAAAAgo/pQGKPX8zn9c/gadget-01.jpg"/&gt;
</code></pre>

<p>When I tried the above code with safari, the task manager in windows shows CPU utilisation of 30%-50%</p>

<p>When I put the above code in a full page with other html code, the utilisation is 60%-70%</p>

<p>So what is different? Why is the js faster on a clear page?</p>
