<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hemanth Srinivas on Medium]]></title>
        <description><![CDATA[Stories by Hemanth Srinivas on Medium]]></description>
        <link>https://medium.com/@hsrinivas797?source=rss-5f38d3a86dcb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*dnI2CZ9UUJriUpbn8PLO0Q.jpeg</url>
            <title>Stories by Hemanth Srinivas on Medium</title>
            <link>https://medium.com/@hsrinivas797?source=rss-5f38d3a86dcb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 15:24:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hsrinivas797/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Jack Rayn Tv Series reveals ‘Real’ Stories in life]]></title>
            <link>https://medium.com/@hsrinivas797/jack-rayn-tv-series-reveals-real-stories-in-life-a5ddec3da0cf?source=rss-5f38d3a86dcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5ddec3da0cf</guid>
            <category><![CDATA[tom-clancy]]></category>
            <category><![CDATA[john-krasinski]]></category>
            <category><![CDATA[jack-ryan]]></category>
            <category><![CDATA[amazon-prime-video]]></category>
            <dc:creator><![CDATA[Hemanth Srinivas]]></dc:creator>
            <pubDate>Fri, 10 Apr 2020 12:57:10 GMT</pubDate>
            <atom:updated>2020-04-10T12:57:10.246Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPod60H1fy21t6EmU4ddKw.jpeg" /></figure><p>Those who haven’t watched the series,Please do watch it.</p><p>Hates off to the director, I think he really saw the future what gona happen in the future .</p><p>The season 1 deals with terriost using Ebola virus to attack on the President of the United states and some scenes in that season depict the real world stories which had happened in the past few months back. I don’t see familiarity that these things happened on lucky.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*W91EfkAqusOnEvhtJ2MoNw.jpeg" /></figure><p>For Example- Billionaire ruler of Dubai<strong>, </strong>Sheikh Mohammed wifes Princess Haya flee away from him to the UK, with children,which depicts one of the scene in the series,where Terriost wife flee away from him to United states. Please don’t judge Sheikh Mohammed as a terriost,he is the prince,ruler of dubai and don’t come to conclusions and don’t judge.</p><p>Terriost uses Ebola virus to spread and uses it as a weapon to kill President of the United states,where as at present Covid19 virus trending now ,president is tested twice to check , I feel some similarity here.</p><p>In Season 2, there’s a scene where US Embassy is attacked in a country.Similarly same scene happend past few months back in Iran , where US Embassy is attacked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnezWulZVhpIdtlGYh9cag.jpeg" /><figcaption>US embassy attack in Iran</figcaption></figure><p>I think I feel some similarity in the series with some real world stories which happened few months back. This is just my view,please don’t come to conclusions or blame somebody.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5ddec3da0cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android App performance tips for developers]]></title>
            <link>https://medium.com/@hsrinivas797/android-app-performance-tips-for-developers-c97547b5dd38?source=rss-5f38d3a86dcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c97547b5dd38</guid>
            <category><![CDATA[beginners-guide-andriod]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-developers]]></category>
            <category><![CDATA[andriod-app-development]]></category>
            <category><![CDATA[andriod-performance-tips]]></category>
            <dc:creator><![CDATA[Hemanth Srinivas]]></dc:creator>
            <pubDate>Sun, 03 Nov 2019 06:06:23 GMT</pubDate>
            <atom:updated>2019-11-06T22:49:18.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*2-tnnwHV2aUCh4tnZqshgw.png" /><figcaption>Performance=Users=Money</figcaption></figure><h3>Introduction</h3><p>Performance is the key factor for any app. It mainly depends on the algorithm and data structure&#39;s you choose. Some improvements listed below can micro-optimize and improve overall app performance of the app. The better the app responds fast ,the more downloads and users you have.</p><p>Before you start optimizing the code, check the Profilers and identify where the app is taking much time or responds slowly,measure existing performance and compare. Otherwise it is of no use of optimizing the code. Though these may look simple, but following these practices makes a huge difference.</p><p>check the link below to know how to use Android Profiler-</p><p><a href="https://developer.android.com/studio/profile/android-profiler">The Android Profiler | Android Developers</a></p><h3>Table of Contents</h3><ul><li>Don’t create unnecessary Objects</li><li>Avoid using floating-point</li><li>Don’t operate long operations on the Main UI Thread</li><li>Use enhanced for loop syntax</li><li>Avoid using nested Layouts</li><li>Know and use the libraries</li><li>Remove unused Resources and code</li><li>General tips</li><li>Wrapping up</li><li>References and Links</li></ul><h3>Don’t create unnecessary Objects</h3><p>Try to avoid creating short term temporary objects if you can.Lesser the objects ,means less- frequent garbage collection.</p><p><strong>Example-</strong> String Vs StringBuilder</p><p>if you want to append more strings,then we would write the code in this way,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*Jw67OCXMsNm70-OxKu79RA.png" /></figure><p>This creates tons of Garbage Collections(GC) .we can write the above code in the following way-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*iMIAHJQouxe5gEPJ_7jbEg.png" /></figure><p>which creates less Garbage collection(GC) and improves performance as well as memory,this is useful while appending large amount of strings.</p><h3><strong>Avoid using floating-point</strong></h3><p>Integer is 2x faster than floating-point on Andriod devices.so try to avoid wherever it requires.</p><h3><strong>Don’t operate long operations on the Main UI Thread</strong></h3><p>Blocking the main UI Thread causes serious performance issues, Specifically, if everything is happening in the UI thread, performing long operations such as network access or database queries will block the whole UI. When the thread is blocked, no events can be dispatched, including drawing events. From the user’s perspective, the application appears to hang. Even worse, if the UI thread is blocked for more than a few seconds (about 5 seconds currently) the user is presented with the infamous “<a href="http://developer.android.com/guide/practices/responsiveness.html"><strong>application not responding</strong></a>” (ANR) dialog. The user might then decide to quit your application and uninstall it if they are unhappy.</p><p><strong>Async Task</strong> is ideal for working on and off UI Thread.</p><p><strong>Handler Thread</strong> is useful when we need a dedicated thread for API callbacks.</p><p><strong>Thread Pool</strong> is useful for breaking our work into small packets and push those to another threads.</p><p><strong>Intent Service </strong>is ideal for background tasks or when you needed to get Intent work off the UI Thread.</p><h3><strong>Use enhanced for loop syntax</strong></h3><p>For example consider below code alternatives for iterating through an array:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*M6rs5NL4IEMElVPxlP3RfQ.png" /></figure><p><strong>zero()</strong> is slowest, because the JIT can&#39;t yet optimize away the cost of getting the array length once for every iteration through the loop.</p><p><strong>one()</strong> is faster. It pulls everything out into local variables, avoiding the lookups. Only the array length offers a performance benefit.</p><p><strong>two()</strong> is fastest for devices without a JIT, and indistinguishable from <strong>one()</strong> for devices with a JIT. It uses the enhanced for loop syntax introduced in version 1.5 of the Java programming language.</p><p>So, you should use the enhanced <strong>for </strong>loop by default, but consider a hand-written counted loop for performance-critical <a href="https://developer.android.com/reference/java/util/ArrayList.html"><strong>ArrayList</strong></a> iteration.</p><h3><strong>Avoid using nested Layouts</strong></h3><p>Try to avoid using Layout inside Layout,because whenever we use any Layout, android draws the view,which takes 2 passes to calculate the size of that view(height and width). Using nested layouts , can lead to deep view hierarchy, if we use nested layouts which use layout_weight parameter can be expensive as child needs to be measured twice.</p><h3>Know and use the libraries</h3><p>Always know the API(s) and the libraries that you use. Always prefer to use a library’s code over writing your own. Remember that the system has the privilege to replace your calls to the library method(s) using a hand-coded assembler, which could be even better than the best code the JIT can come up with for the equivalent Java.</p><p>A classic example here would be the String’s IndexOf<strong><em> </em></strong>method and associated APIs, which Dalvik will replace with an inlined intrinsic. Similarly, the System’s ArrayCopy<strong> </strong>method is about 9x faster than a hand-coded loop on a Nexus One with the JIT.</p><p>When you decide to use an external library, you may need to optimize that library for mobile devices. Plan for that work up-front and analyze the library in terms of code size and RAM footprint before deciding to use it at all.</p><h3><strong>Remove unused Resources and code</strong></h3><p>Remove unused resources which are of no use to the app likes strings,variables,drawables etc. In <strong>Android Studio Menu</strong> &gt; <strong>Refactor</strong> &gt; <strong>Remove Unused Resources… </strong>Select the resources you want to remove. Remove unused code which is not required in the app.</p><h3>General Tips</h3><p>I think these tips, you have already know about these or implemented in your code , I just review those</p><ul><li>use Parcelable Over Serializable</li><li>Use Cache Memory</li><li>Use Recycler View instead of List View</li><li>Use <strong>Static Final</strong> For Constants</li></ul><h3>Wrapping up</h3><p>Everyday is a new day, by reading my blog, you have learnt something new today and I think it is resourceful and knowledgeable. If you find anything wrong in my blog, please comment it so that I can fix it up.Please comment down below, if you have improved your app performance.</p><p>Smash that clap button if you liked this post.</p><h3>References and Links</h3><p>Jason D,2017,’<em>Fast Loading Speed’[image]</em>,viewed 3 November 2019, &lt;https://thimpress.com/ways-wordpress-meet-user-expectations/fast-loading-speed/&gt;.</p><ul><li><a href="https://developer.android.com/training/articles/perf-tips">Performance tips | Android Developers</a></li><li><a href="https://dzone.com/articles/tips-tricks-and-tools-for-android-application-opti">Tips, Tricks, and Tools for Android Application Optimization - DZone Mobile</a></li><li><a href="https://android.jlelse.eu/android-performance-patterns-rescue-tips-8c1e4c7cb1f0">Android Performance Patterns: Rescue tips</a></li><li><a href="https://www.9spl.com/blog/memory-and-code-optimization-tips-for-android-developers/">Memory &amp; Code Optimization Tips for Android Developers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c97547b5dd38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>