10-07-2011 01:15 PM - edited 10-07-2011 01:16 PM
I am having an application which shows data stored in a database. The application fetches the data from database and fill a bean class. The application has around 170 pages each page has data taken from database. The pages can be traversed horizontally using arrow button. On each button press new detail screen is pushed with data taken from database. The problem is after using the app for around 10 min the application calls GC(not called by me) and the performance of the application degrades and it becomes really slow that I need to exit it and start it. The GC is called by VM and once it comes the application requires a restart. Anyone faced similar issue ??
10-07-2011 09:50 PM
Your application sounds like it should not cause the phone any stress. The fact that it does would indicate to me that you are steadily increasing your virtual storage usage. One thing I would look at is this:
"On each button press new detail screen is pushed "
Are you pushing a new screen and popping the preceding screen? if you are not popping, you are steadily pushing up your memory usage. I would investigate this, or look for something similar in your application.
If you search the forum for references to the 'profiler' you might find some information about a tool that will help you with this search.
10-07-2011 10:17 PM
10-08-2011 11:26 AM
I wouldn't have thought so. I would look at using the profiler and determining what Objects you are using and not freeing firstly. It could also be that you are just using a load of OBjects, but my experience is that while displaying a screen the GC will kick in and recover objects used by the previous screen. Is there a chance that you retain a reference to all previous screens used and so they are not freed?
Anyway, I would have a look at using the profiler to help you find this. Search the forum for further information.