
setInterval() <-issues because sometimes it doesn’t finish before the next function starts. To solve it make setTimeout call itself:
(function(){
  doStuff();
  setTimeout(arguments.callee,100)
}()
arguments.callee to refer to the currently executing function
 or better:
(function names(){
  doStuff();
  setTimeout(names,100)
}()