{"id":2419,"date":"2015-10-26T08:00:29","date_gmt":"2015-10-26T15:00:29","guid":{"rendered":"https:\/\/redfindevelop.wpengine.com\/blog\/devblog\/?p=2419"},"modified":"2020-10-05T13:12:03","modified_gmt":"2020-10-05T20:12:03","slug":"using-fresco-to-load-images-efficiently-on-android","status":"publish","type":"post","link":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/","title":{"rendered":"Using Fresco to Load Images Efficiently on Android"},"content":{"rendered":"<p><b><\/b><span style=\"font-weight: 400;\">It\u2019s well known that you don\u2019t get a second chance at a first impression and often, it\u2019s the first impression that becomes the lasting memory. Whether you\u2019re buying, selling, or browsing homes, you always want to remember the hero shot<\/span><span style=\"font-weight: 400;\">\u2014<\/span><span style=\"font-weight: 400;\">the image that represents the home perfectly. It could be the trail of flowers leading up to a grand front entrance, a cozy view of the family room fireplace, or maybe just a sneak peek from the foyer. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">The one thing you definitely don\u2019t want to remember is a loading spinner<\/span><span style=\"font-weight: 400;\">\u2014<\/span><span style=\"font-weight: 400;\">particularly one that prevents you from loading any more images.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Unfortunately, this is exactly what was happening for many of Redfin\u2019s Android app users. Every release, Redfin users would run out of memory on their devices as they were browsing through images. Once they ran out, we were often unable to free that memory, requiring them to restart the app to continue.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We tried several solutions to alleviate the problem. Our first attempt was to be more conservative with our memory usage by waiting for the user to scroll to an image before loading it. This allowed us to minimize the number of images loaded at once, and made sure we never loaded an image unnecessarily. We also became a lot more conservative with our memory caches, aggressively evicting images that were off screen and reloading them if they needed to be displayed again. We used <\/span><a href=\"https:\/\/github.com\/square\/leakcanary\"><span style=\"font-weight: 400;\">Leak Canary<\/span><\/a><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">an awesome debugging tool developed by Square, to track down memory leaks and avoid wasting memory.<\/span> <span style=\"font-weight: 400;\">Using Leak Canary, we were able to track down several scenarios where we leaked a context, and by removing these leaks we reduced our memory footprint by up to 20%.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">All of these improvements helped but did not really solve the problem. It became clear we needed a more sophisticated pipeline for loading images and to better manage our memory. This is where <\/span><a href=\"http:\/\/frescolib.org\/\"><span style=\"font-weight: 400;\">Fresco<\/span><\/a><span style=\"font-weight: 400;\">, an open source image-loading library developed by Facebook, came into play.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Fresco allowed us to greatly improve the performance and memory usage of displaying images to our users. The results of the awesome improvement in experience are shown below! See if you can guess which screen shows life before Fresco, and which is after\u2026<\/span><\/p>\n<p>https:\/\/www.youtube.com\/watch?v=x8ohQwY4wJQ#action=share<\/p>\n<h3>Preloading Images In A RecyclerView<\/h3>\n<p><span style=\"font-weight: 400;\">Before switching to Fresco we were forced to focus on minimizing our memory footprint even at the expense of our user experience. \u00a0One way we accomplished this was by only loading images for views currently on screen. We did this by attaching a scroll listener to our list, which is implemented using a RecyclerView, so that we only start loading our images once a user scrolls and settles on a new position in the list.<\/span><\/p>\n<p><small><span style=\"font-weight: 400;\">Loading Images as they come into view:<\/span><\/small><\/p>\n<pre class=\"theme:obsidian-light lang:java decode:true\">final LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\nrecyclerList.setLayoutManager(layoutManager);\nrecyclerList.addOnScrollListener(new RecyclerView.OnScrollListener() {\n\n   @Override\n   public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n       if (newState == RecyclerView.SCROLL_STATE_IDLE) {\n           int firstViewIndex = layoutManager.findFirstVisibleItemPosition();\n           int lastViewIndex = layoutManager.findLastVisibleItemPosition();\n\n           for (int viewIndex = firstViewIndex; viewIndex &lt;= lastViewIndex; viewIndex++) {\n               HomeCardView childView = (HomeCardView) layoutManager.findViewByPosition(viewIndex);\n               childView.downloadPhoto();\n           }\n       }\n   }\n});<\/pre>\n<p>This implementation minimizes our memory footprint because we\u2019re guaranteeing that images are only loaded when needed. \u00a0However, by definition this provides a bad experience &#8211; the user will have to wait for the image to load because it doesn\u2019t start loading until the user is ready to see it.<\/p>\n<p><span style=\"font-weight: 400;\">Fresco allows us to pre-load images more aggressively so that they\u2019ll always be fully rendered by the time the user scrolls to them. With a RecyclerView we can accomplish this by starting to load an image when the Adapter for our RecyclerView binds a view holder to a data set. This is when the View for that item is populated in the list, as well as a perfect time to launch the image request. Now the user is much less likely to have to wait for an image to load since we\u2019re able to prefetch images as they scroll through a list. If the user scrolls back up in the list, the image will be found in our cache and can be rendered instantly.<\/span><\/p>\n<p><small><span style=\"font-weight: 400;\">Loading an image as soon as a View is bound:<\/span><\/small><\/p>\n<pre class=\"theme:obsidian-light lang:java decode:true\">public class RecyclerViewAdapter extends RecyclerView.Adapter&lt;HomeCardViewHolder&gt; {\n\n   @Override\n   public void onBindViewHolder(HomeCardViewHolder holder, int position) {\n       holder.bind(getData(position));\n       holder.downloadImage();\n   }\n}<\/pre>\n<h3>Memory Management on Android<\/h3>\n<p><span style=\"font-weight: 400;\">Android provides developers with a few different regions of memory for applications to use. The most common is the Java Heap, where the memory for standard Java objects is allocated. In this region, Java automatically tracks all references to these objects and the Java garbage collector frees the corresponding memory when an object is no longer referenced.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Storing images here was troublesome for us because devices limit the size of the Java Heap for each application. When large images were saved here, the limited space was used up quickly which prevented us from loading any more images, and sometimes even caused a crash.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">However, another region of memory available to us is the <\/span><i><span style=\"font-weight: 400;\">ashmem<\/span><\/i><span style=\"font-weight: 400;\"> region. This region operates much like a native heap where developers must manage their own memory, outside of the garbage collector\u2019s jurisdiction. In general, Java applications don\u2019t have access to this region. However, Android does provide some hooks to use it for images. When we decode an uncompressed image, known as a bitmap, we can mark that bitmap to be placed on the <\/span><i><span style=\"font-weight: 400;\">ashmem<\/span><\/i><span style=\"font-weight: 400;\">. This allows us to store the bitmaps off the Java Heap and would effectively resolve our memory issues.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As with all things that seem too good to be true, there\u2019s a catch. The Android system will \u201cunpin\u201d the image after it\u2019s finished drawing it, which effectively tells the system we\u2019re done with this memory and it can be freed. If the image needs to be re-drawn, we would need to decode it to a bitmap again. Decoding an image is an expensive operation, doubly so because it needs to happen on the UI thread, where processing power is a precious resource. <\/span><span style=\"font-weight: 400;\">User interactions need to be buttery smooth, which can&#8217;t happen when we&#8217;re dropping frames while decoding the image.<\/span><span style=\"font-weight: 400;\"> Thus, we need to be able to save the decoded bitmap to keep our app running smoothly; it\u2019s not feasible to decode an image every time it needs to be redrawn.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This is where the magic of the Fresco pipeline happens. Fresco is able to use Android\u2019s Native Development Kit (NDK) to manually manage when images are placed in ashmem, and more importantly, when they are unpinned from <\/span><i><span style=\"font-weight: 400;\">ashmem<\/span><\/i><span style=\"font-weight: 400;\">. By using Fresco, we can use <\/span><i><span style=\"font-weight: 400;\">ashmem<\/span><\/i><span style=\"font-weight: 400;\"> as an efficient memory storage away from the Java heap and not worry about decoding our images over and over. A more thorough technical deep dive of Fresco can be found in<\/span><a href=\"https:\/\/code.facebook.com\/posts\/366199913563917\"> <span style=\"font-weight: 400;\">Facebook\u2019s development blog post announcing the Fresco release.<\/span><\/a><\/p>\n<h3>Delivering Results<\/h3>\n<p><span style=\"font-weight: 400;\">Integrating Fresco has allowed us to deliver a much better user experience. Before switching to Fresco we regularly saw about 1% of our users get failures during loading, and on average, users had around 7.5 images fail to load. In many of these cases, users would need to quit the app to once again browse images. \u00a0By switching to Fresco, we\u2019ve seen a whopping <\/span><b>90%<\/b><span style=\"font-weight: 400;\"> reduction in these errors.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">All of our users were experiencing dropped frames and long image load times. We\u2019ve improved this experience by now more aggressively caching and pre-fetching our images than ever before. In our list views, we can now begin loading images before they come into view, giving the user a smoother scrolling experience. We can also keep the images around longer; once they\u2019re displayed, we don\u2019t need to load or decode them again.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s well known that you don\u2019t get a second chance at a first impression and often, it\u2019s the first impression that becomes the lasting memory. Whether you\u2019re buying, selling, or browsing homes, you always want to remember the hero shot\u2014the image that represents the home perfectly. It could be the trail of flowers leading up [&hellip;]<\/p>\n","protected":false},"author":13079,"featured_media":2430,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[57],"tags":[102],"coauthors":[],"class_list":["post-2419","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-company-news","tag-smart-home-tech"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.7 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Using Fresco to Load Images Efficiently on Android<\/title>\n<meta name=\"description\" content=\"Integrating Fresco has allowed us to deliver a much better user experience when loading images on Android.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Fresco to Load Images Efficiently on Android\" \/>\n<meta property=\"og:description\" content=\"Integrating Fresco has allowed us to deliver a much better user experience when loading images on Android.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/\" \/>\n<meta property=\"og:site_name\" content=\"Redfin Real Estate News\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/redfin\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-26T15:00:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-05T20:12:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2015\/10\/fresco-logo1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"130\" \/>\n\t<meta property=\"og:image:height\" content=\"130\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Anshu Rustagi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@redfin\" \/>\n<meta name=\"twitter:site\" content=\"@redfin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anshu Rustagi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/\"},\"author\":{\"name\":\"Anshu Rustagi\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#\\\/schema\\\/person\\\/7d1d70d26b3d3c17a9627cb5d7a573fb\"},\"headline\":\"Using Fresco to Load Images Efficiently on Android\",\"datePublished\":\"2015-10-26T15:00:29+00:00\",\"dateModified\":\"2020-10-05T20:12:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/\"},\"wordCount\":1241,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.redfin.com/news\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/fresco-logo1.png\",\"keywords\":[\"Smart Home Tech\"],\"articleSection\":[\"Company News\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#respond\"]}],\"copyrightYear\":\"2015\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/\",\"url\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/\",\"name\":\"Using Fresco to Load Images Efficiently on Android\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.redfin.com/news\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/fresco-logo1.png\",\"datePublished\":\"2015-10-26T15:00:29+00:00\",\"dateModified\":\"2020-10-05T20:12:03+00:00\",\"description\":\"Integrating Fresco has allowed us to deliver a much better user experience when loading images on Android.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.redfin.com/news\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/fresco-logo1.png\",\"contentUrl\":\"https:\\\/\\\/www.redfin.com/news\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/fresco-logo1.png\",\"width\":130,\"height\":130},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/using-fresco-to-load-images-efficiently-on-android\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.redfin.com/news\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Fresco to Load Images Efficiently on Android\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#website\",\"url\":\"https:\\\/\\\/www.redfin.com/news\\\/\",\"name\":\"Redfin Real Estate News\",\"description\":\"The latest real estate news and research from technology-powered residential real estate company, Redfin.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.redfin.com/news\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#organization\",\"name\":\"Redfin\",\"url\":\"https:\\\/\\\/www.redfin.com/news\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.redfin.com\\\/news\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/Redfin-News-Logo.png\",\"contentUrl\":\"https:\\\/\\\/www.redfin.com\\\/news\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/Redfin-News-Logo.png\",\"width\":1100,\"height\":235,\"caption\":\"Redfin\"},\"image\":{\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/redfin\",\"https:\\\/\\\/x.com\\\/redfin\",\"https:\\\/\\\/www.instagram.com\\\/redfinrealestate\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/redfin\",\"https:\\\/\\\/www.pinterest.com\\\/redfin\\\/\",\"https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Redfin\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.redfin.com/news\\\/#\\\/schema\\\/person\\\/7d1d70d26b3d3c17a9627cb5d7a573fb\",\"name\":\"Anshu Rustagi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1fd8c586b7c869ac5da0a9eb99a212352c5cc2ad9198440812696a85a1eddb42?s=96&d=wp_user_avatar&r=g8bc93d2cc1587f03dd580fd21651190a\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1fd8c586b7c869ac5da0a9eb99a212352c5cc2ad9198440812696a85a1eddb42?s=96&d=wp_user_avatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1fd8c586b7c869ac5da0a9eb99a212352c5cc2ad9198440812696a85a1eddb42?s=96&d=wp_user_avatar&r=g\",\"caption\":\"Anshu Rustagi\"},\"description\":\"Android Developer at Redfin.\",\"sameAs\":[\"https:\\\/\\\/plus.google.com\\\/108689695490571027090\"],\"url\":\"https:\\\/\\\/www.redfin.com/news\\\/author\\\/anshu-rustagiredfin-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Using Fresco to Load Images Efficiently on Android","description":"Integrating Fresco has allowed us to deliver a much better user experience when loading images on Android.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/","og_locale":"en_US","og_type":"article","og_title":"Using Fresco to Load Images Efficiently on Android","og_description":"Integrating Fresco has allowed us to deliver a much better user experience when loading images on Android.","og_url":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/","og_site_name":"Redfin Real Estate News","article_publisher":"https:\/\/www.facebook.com\/redfin","article_published_time":"2015-10-26T15:00:29+00:00","article_modified_time":"2020-10-05T20:12:03+00:00","og_image":[{"width":130,"height":130,"url":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2015\/10\/fresco-logo1.png","type":"image\/png"}],"author":"Anshu Rustagi","twitter_card":"summary_large_image","twitter_creator":"@redfin","twitter_site":"@redfin","twitter_misc":{"Written by":"Anshu Rustagi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#article","isPartOf":{"@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/"},"author":{"name":"Anshu Rustagi","@id":"https:\/\/www.redfin.com\/news\/#\/schema\/person\/7d1d70d26b3d3c17a9627cb5d7a573fb"},"headline":"Using Fresco to Load Images Efficiently on Android","datePublished":"2015-10-26T15:00:29+00:00","dateModified":"2020-10-05T20:12:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/"},"wordCount":1241,"commentCount":0,"publisher":{"@id":"https:\/\/www.redfin.com\/news\/#organization"},"image":{"@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#primaryimage"},"thumbnailUrl":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2015\/10\/fresco-logo1.png","keywords":["Smart Home Tech"],"articleSection":["Company News"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#respond"]}],"copyrightYear":"2015","copyrightHolder":{"@id":"https:\/\/www.redfin.com\/news\/#organization"}},{"@type":"WebPage","@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/","url":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/","name":"Using Fresco to Load Images Efficiently on Android","isPartOf":{"@id":"https:\/\/www.redfin.com\/news\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#primaryimage"},"image":{"@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#primaryimage"},"thumbnailUrl":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2015\/10\/fresco-logo1.png","datePublished":"2015-10-26T15:00:29+00:00","dateModified":"2020-10-05T20:12:03+00:00","description":"Integrating Fresco has allowed us to deliver a much better user experience when loading images on Android.","breadcrumb":{"@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#primaryimage","url":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2015\/10\/fresco-logo1.png","contentUrl":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2015\/10\/fresco-logo1.png","width":130,"height":130},{"@type":"BreadcrumbList","@id":"https:\/\/www.redfin.com\/news\/using-fresco-to-load-images-efficiently-on-android\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redfin.com\/news\/"},{"@type":"ListItem","position":2,"name":"Using Fresco to Load Images Efficiently on Android"}]},{"@type":"WebSite","@id":"https:\/\/www.redfin.com\/news\/#website","url":"https:\/\/www.redfin.com\/news\/","name":"Redfin Real Estate News","description":"The latest real estate news and research from technology-powered residential real estate company, Redfin.","publisher":{"@id":"https:\/\/www.redfin.com\/news\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redfin.com\/news\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redfin.com\/news\/#organization","name":"Redfin","url":"https:\/\/www.redfin.com\/news\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redfin.com\/news\/#\/schema\/logo\/image\/","url":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2020\/10\/Redfin-News-Logo.png","contentUrl":"https:\/\/www.redfin.com\/news\/wp-content\/uploads\/2020\/10\/Redfin-News-Logo.png","width":1100,"height":235,"caption":"Redfin"},"image":{"@id":"https:\/\/www.redfin.com\/news\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/redfin","https:\/\/x.com\/redfin","https:\/\/www.instagram.com\/redfinrealestate\/","https:\/\/www.linkedin.com\/company\/redfin","https:\/\/www.pinterest.com\/redfin\/","https:\/\/en.wikipedia.org\/wiki\/Redfin"]},{"@type":"Person","@id":"https:\/\/www.redfin.com\/news\/#\/schema\/person\/7d1d70d26b3d3c17a9627cb5d7a573fb","name":"Anshu Rustagi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1fd8c586b7c869ac5da0a9eb99a212352c5cc2ad9198440812696a85a1eddb42?s=96&d=wp_user_avatar&r=g8bc93d2cc1587f03dd580fd21651190a","url":"https:\/\/secure.gravatar.com\/avatar\/1fd8c586b7c869ac5da0a9eb99a212352c5cc2ad9198440812696a85a1eddb42?s=96&d=wp_user_avatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1fd8c586b7c869ac5da0a9eb99a212352c5cc2ad9198440812696a85a1eddb42?s=96&d=wp_user_avatar&r=g","caption":"Anshu Rustagi"},"description":"Android Developer at Redfin.","sameAs":["https:\/\/plus.google.com\/108689695490571027090"],"url":"https:\/\/www.redfin.com\/news\/author\/anshu-rustagiredfin-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/posts\/2419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/users\/13079"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/comments?post=2419"}],"version-history":[{"count":0,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/posts\/2419\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/media\/2430"}],"wp:attachment":[{"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/media?parent=2419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/categories?post=2419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/tags?post=2419"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.redfin.com\/news\/wp-json\/wp\/v2\/coauthors?post=2419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}