Home | History | Annotate | Download | only in displaying-bitmaps

Lines Matching full:disk

15   <li><a href="#disk-cache">Use a Disk Cache</a></li>
44 and disk cache can often help here, allowing components to quickly reload processed images.</p>
46 <p>This lesson walks you through using a memory and disk bitmap cache to improve the responsiveness
173 <h2 id="disk-cache">Use a Disk Cache</h2>
181 <p>A disk cache can be used in these cases to persist processed bitmaps and help decrease loading
182 times where images are no longer available in a memory cache. Of course, fetching images from disk
183 is slower than loading from memory and should be done in a background thread, as disk read times can
191 <a href="https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/libcore/io/DiskLruCache.java">Android source</a>. Here?s updated example code that adds a disk cache in addition
206 // Initialize disk cache on background thread
232 // Check disk cache in background thread
235 if (bitmap == null) { // Not found in disk cache
255 // Also add to disk cache
265 // Wait while disk cache is started from background thread
292 <p class="note"><strong>Note:</strong> Even initializing the disk cache requires disk operations
295 object ensures that the app does not read from the disk cache until the cache has been
298 <p>While the memory cache is checked in the UI thread, the disk cache is checked in the background
299 thread. Disk operations should never take place on the UI thread. When image processing is
300 complete, the final bitmap is added to both the memory and disk cache for future use.</p>
364 hopefully available in the disk cache, if not, they are processed as usual.</p>