firefox-echo-show icon indicating copy to clipboard operation
firefox-echo-show copied to clipboard

Add LeakCanary to catch memory leaks during development

Open mcomella opened this issue 7 years ago • 1 comments

Why/User Benefit/User Problem

Memory leaks are bad: if the app is open for long enough, they cause the app and device performance to slow down. At some point, Firefox will be killed when it is no longer able to allocate memory. Bad for users. :(

afaik, it's hard to test for this in Java and on Android. LeakCanary is the accepted Android way to test for common Android memory leaks and it is run in local builds.

Unfortunately, it won't work as well for Echo Show – getting the traces requires notifications to be enabled – but it should work fine on the Android emulator. At the very least, on device, we'll see a notification and know we have a memory leak.

In the past, on Fire TV, we had some build issues integrating LeakCanary but let's hope those are all cleaned up.

What / Requirements

  • Integrate LeakCanary SDK with our debug builds
  • Consider how we might automate LeakCanary (adb monkey regularly? UI tests?) - follow-up?

Acceptance Criteria (how do I know when I’m done?)

mcomella avatar Jan 10 '19 22:01 mcomella

Should look at this for Fire TV first, since more people are working on it. Once it's been completed there, we can take the learnings to implement on Echo Show

athomasmoz avatar Feb 06 '19 22:02 athomasmoz