开发者

Process uses large amount of memory

I'm building an Android app that parses a pretty big XML file (around 500 items) using SAX and then rendering it to a ListView via a custom adapter. I'm parsing the XML to a List I created, which I then pass the List object to my custom adapter (Not all开发者_开发百科 500 items are added to the List, usually around 50 or so).

Everything works fine and the app seems pretty responsive on my Nexus One, but when I view the app in Settings, under Running -> "show cached processes", the process can be using anywhere from 40MB-70MB of memory. Not sure if I have a memory leak somewhere, or what that means, but it seems pretty high to me.


Even at 500 items unless your XML is very redundant or unless each item is huge you should be fine on the file side of things.

What you can do is you can check whats making allocations inside DDMS (From Eclipse: Open DDMS perspective => Click on your app name in the list under your device => allocation tracker tab => start tracking => get allocations after your list renders).

A little more info about what kind of app your running might be helpful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜