Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>some advices:</p> <ol> <li><p><strong>do not have a static reference to a View</strong> object (or a drawable , or anything that has a reference to context) . it's a very bad practive which could easily get you to memory leaks .reason: even after leaving the activity , there is a static reference to a view which references to the activity that you've left,including all of its fields(your large collections , for example). read <a href="http://developer.android.com/resources/articles/avoiding-memory-leaks.html" rel="nofollow"><strong>here</strong></a> for more info.</p></li> <li><p>do you really have to read the entire file , and store its entire content into the memory? of course it's easy for you and much faster than anything else , but it can easily take a lot of memory , especially if you use it this way . try to <strong>read only what you need</strong> , and <strong>store only what you need</strong>.</p></li> <li><p>watch <a href="http://www.google.com/events/io/2011/sessions/memory-management-for-android-apps.html" rel="nofollow"><strong>google's</strong></a> video for showing how to find &amp; handle memory leaks </p></li> <li><p>do you really have to store the data in strings? how about just the values that need to be checked (coordinates,perhaps?) or a <strong>collection of Pois</strong> , each has its own fields (id,name,coordinates,...) ? a string in java is an array of characters , each takes 2 bytes (since it's unicode) , so it can take a lot of space in the memory .as an example, 60000 rows times 80 characters times 2 bytes per character is 9,600,000 bytes , which is almost <strong>10MB</strong> . you need to be tighter in memory usage. remember that it's a mobile platform which has memory efficiency in one of its top priorities (for better tasks switching) .</p> <p>using a collection of Pois will not only be better in design perspective (easier to read , understand , maintain,...) . it will also take less space - using primitives instead of wrappers (int instead of Integer, for example) . </p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload