High usage of RAM causes to slow down an Android app
I'm developing an Android application, which is uses a WebView to load
website from the assets folder. The website is based on Knockout.js, so
almost everything is dynamic and observable (in terms of KO). Besides,
it's doing TCP requests every 100 milliseconds and updates a particular
part of the view, based on the response.
A week ago I realized, that my app is running too slow, then I noticed,
that it uses 60-100MB of RAM. I've tried almost all solutions from the
web, e.g. disable app cache, disable WebView cache, etc., but with no
luck.
I also did some tests and noticed, that, for example, a "blank" app
(nothing but "HelloWorld") uses 9-10MB of RAM, an app with WebView, which
simply loads a single URL, uses almost 20MB of RAM.
I've read many articles regarding WebView memory leak, but couldn't get to
work any of those solutions. I'm really confused.
So, actually, I have two questions:
Is it normal for app like this to use 60-100MB of RAM?
If yes, why? And if no, which kind of changes/optimizations should I do to
have an app which consumes RAM as expected?
Thanks in advance.
P.S. I'm hopefully expecting a working solution.
No comments:
Post a Comment