<?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 Enes Ay on Medium]]></title>
        <description><![CDATA[Stories by Enes Ay on Medium]]></description>
        <link>https://medium.com/@enees.ayy.dev?source=rss-443d73f38a38------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pIdneUVb-1wWvLh3</url>
            <title>Stories by Enes Ay on Medium</title>
            <link>https://medium.com/@enees.ayy.dev?source=rss-443d73f38a38------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 09:25:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@enees.ayy.dev/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[Reduce the Time to First Interaction with Baseline Profiles in Android]]></title>
            <link>https://medium.com/@enees.ayy.dev/reduce-the-time-to-first-interaction-with-baseline-profiles-in-android-4783873035fd?source=rss-443d73f38a38------2</link>
            <guid isPermaLink="false">https://medium.com/p/4783873035fd</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Enes Ay]]></dc:creator>
            <pubDate>Fri, 01 Aug 2025 22:09:17 GMT</pubDate>
            <atom:updated>2025-08-01T22:09:17.280Z</atom:updated>
            <content:encoded><![CDATA[<p>When we think like human for a minute, first few seconds is very important for everything. Knowing a person, trying different hobby, eating something new. First impression is something hard to change later. Its also really important for users that using our apps. At this very first article of mine i will talk about how to decrease background tasks on startup and have more time for creating a vision for your app in users mind.</p><p>Baseline Profiles means a strategy that handles functions before they called, like a visionary, and with that app will take action faster when that actions happenes. You can also think like app is trained for those actions.<br>Enough reading, lets get to action. I will use my app to show you performance difference and integration. I want to increase my onboarding screen and apps first screens performance.</p><p>Let me tell you to steps first.<br>Create a benchmark module,<br>Create a test to generate our optimized baseline profile,<br>Use that baseline profile as default in your app.<br>Its just that simple.</p><p>First we need to create a benchmark module in our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5I1dRTBuaTqbscb8_qvFQ.png" /><figcaption>Create a new benchmark module</figcaption></figure><p>Create a new class for our needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*exijGe-pXYJdzSwP6OaRFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHn_ND91R_fpL4gxsaxccA.png" /></figure><p>To find that button i leave a tag on that buttons modifier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P53Dh2M4WAkIc74JdpcJqg.png" /></figure><p>And also after onboarding, i have a screen that has a camera preview. So i also want to see that camera initialized and start streaming. So i added this log. We will also calculate that time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ydCrm8H1becpXsXlwWSPrQ.png" /></figure><p>To obtain created baseprofiles results, we need a rooted device, but thanks to emulator, we can use it. Just you need to add testOptions in build.gradle and we need to create new configration to easy usage with this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0uIYAjaUYKP-8o_yUjYWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*syYZKJeQekEiWY20egIjwg.png" /><figcaption>:benchmark:pixel2Api31BenchmarkAndroidTest — rerun-tasks -P android.testInstrumentationRunnerArguments.class=com.xxxxx.benchmark.BaselineGenerator</figcaption></figure><p>After running it, our baseline profile will created in here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z5RRpTJa8uwf9JjEk-JIxg.png" /></figure><p>To use it, you can simply copy and paste it to main</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TkTKTHoGFbu7idFRtlcs2A.png" /></figure><p>Now we created our new baseline profile. But is it effective?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SKikc_PlxuzmqYPxRxvC0w.png" /></figure><p>Lets create a benchmark to see the results.</p><p>We have 4 type of benchmark, with and without baseline profiles for both startUp and onboarding processes.</p><p>And here is the test results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AWBdro68kt3uAlzQoDE8ww.png" /></figure><p>We now have 8ms more :D I know it looks small but this is just for startup times, Baseline profiles also gives you more fps when a scrollable view has been optimized with this strategy. I hope this helps you for idea and more. Thanks for reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4783873035fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>