Skip to content

Instantly share code, notes, and snippets.

@mschmulen
Created January 5, 2011 22:13
Show Gist options
  • Save mschmulen/767124 to your computer and use it in GitHub Desktop.
Save mschmulen/767124 to your computer and use it in GitHub Desktop.
Appc performance tips

Appc Performance tips

  • More efficient for repeating timers to use setInterval that repeating a setTimer. You'll get better efficiency and scheduling and less overhead.
  • Cancel your timers. Calling setInterval which will return a timer handle. to cancel a timer clearTimeout or clearInterval and pass the handle returned by either setTimeout or setInterval.
  • Use JSON.parse instead of eval.
  • Don't re-use XHR Objects. It's not safe and they're not meant to be re-usable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment