Memoize Entry Files to reduce char[] allocations.

While trying to reduce garbage collections in a sample app, I noticed that this library allocates a couple of strings per request (once for the file name, and once to join the directory and the file name) which generates enough garbage to cause gcs to noticeably increase in frequency. 

The largest strings I saw  were around 300 characters so the memory overhead of holding on to the files for each entry is probably pretty small. Even with 5000 entries in memory at once the total overhead would be less than 3mb (300 characters * 2 bytes per character * 5000 entries). At the same time even with only a few items per row, scrolling a list could easily generate a couple of kB worth of garbage per row.


so if the number of files changes, then you have probably a bunch of gaps or unused memory allocated by the array. I understand your concern with the HashMap overhead, how about a SparseArray, kind of meant for these issues no?