Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out Of Memory in Android #588

Open
Lily418 opened this issue Jul 6, 2018 · 1 comment
Open

Out Of Memory in Android #588

Lily418 opened this issue Jul 6, 2018 · 1 comment
Labels

Comments

@Lily418
Copy link

Lily418 commented Jul 6, 2018

Description of issue

There have been a number of out of memory issues occuring on Android affecting users with lower spec Android devices (~1.5GB RAM) These crashes have occured on the events screen and also the parade screen. I've profiled the memory usage and discussed with @RGBboy and there's a couple of different issues.

Images loaded from Contentful are not optimised

The events page loads the orginal size of the image from Contentful and then rescales. This is a perfomance issue because these bitmaps can be large. Contentful API allows to request a specific size of image, we can use this to avoid creating bitmaps get down scaled for rendering.

Google Maps Memory Usage Spike

Google Maps uses additional memory when it is first opened and garbage collection does not occur instantly when switching tabs. This means when switching between Events and Parade for a moment memory usage can exceed the ~100MB allocated on these lower end devices.

Potential Solution

I think that optimising the use of Contentful is the most impactful memory optimisation we could make at this time, and by reducing the memory usage on the Events page we will reduce the occurance of Out of Memory on the Parade screen.

Steps to reproduce

Attach to the Android Studio perfomance profiler, double click on the memory graph (That smaller version of the graph uses a lower sample rate which doesn't show the behaviour I've described as clearly) scroll the Events screen, switch between Parade screen and Events screen to observe that peak memory usage is high whilst switching tabs.

I haven't been able to observe the Out of Memory issue itself. The device I was testing on didn't have many competing processes so likely allocated more Java Virtual Machine heap space.

OS / Browser / Device model

Android Devices which have 1.5GB RAM or less

@Lily418
Copy link
Author

Lily418 commented Jul 6, 2018

#587 is the issue which tracks the specific suggest to reduce memory usage on Events page

@RGBboy RGBboy added the bug label Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants