Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all your script doesn't take into account that minimal timeout is usually 10-15ms depending on a browser. You can see <a href="http://lazutkin.com/blog/2008/mar/23/javascript-edp-and-0ms-timeouts/" rel="nofollow noreferrer">my post on this topic</a>. Inside you'll find a table for popular browsers and a link to the program that measures it, so you can verify the claim yourself. I am sorry to say but iterations every 5ms is a wishful thinking.</p> <p>Secondly, timers are not interrupts. There is no magic in them &mdash; they cannot interrupt whatever is running in the browser and execute their payload. Instead they are going to be deferred until the running code finishes and the browser gets back the control and the ability to run timers. Fading 50 elements take time, and I bet it is more than 5ms, especially if you take into account the whole deferred model of the browser: you update DOM, and the browser will update its visual representation &hellip; at some point in time.</p> <p>I want to finish on a positive note:</p> <ul> <li>Instead of fading out 50 individual elements, try to group them and fade their parent &mdash; it can be faster.</li> <li>Be more creative at UI. Try to come up with a solution, which doesn't require fading out a lot of independent elements at once.</li> <li>Always verify that your background assumptions are correct before designing around them.</li> <li>If you can, try to target modern browsers. From my personal experience Google Chrome is very good with timers, and its JavaScript engine (V8) is extremely fast.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload