Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There have been some really great articles on this subject recently. There are some really surprising sources of object creation that don't really catch your attention unless you're tuned for it. Typically, the problem isn't the memory use, it's actually the garbage collection cycles required to collect the memory the app is slowly leaking.</p> <p>This article is the best I've read on the topic recently: <a href="http://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript">http://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript</a></p> <p>As far as tools to combat/diagnose the issue, Google Chrome's Speedtracer comes to mind. Of course, tuning for Chrome doesn't guarantee tuning for all browsers, but most of the things that result in object creation in Chrome are common to the JS spec as it's implemented by all the browsers.</p> <p>One important thing to consider is that RAM use and video RAM use are not the same. One best practice is to determine which portions of your UI are being hardware accelerated and to make sure they're small (i.e. fit on screen all at once). If you have huge scrolling portions of the screen hardware accelerated, you will get GPU tearing/tiling and laggy scrolling. You can detect this in part using the iOS simulator. This article covers the idea briefly: <a href="http://devinsheaven.com/turn-your-iphone-wacky-and-make-your-iphone-application-better/">http://devinsheaven.com/turn-your-iphone-wacky-and-make-your-iphone-application-better/</a></p> <p>Lastly, there are a bunch of really common memory leaky patterns in JavaScript that every engineer runs into from time to time. IBM has a good list of them. I can't post more than two links because I'm a n00b, but you can google for "Common JavaScript Memory Leaks" and it's probably the first result.</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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