Improve startup time of app using Google Firebase
<p>I recently started playing with the new firebase API's provided by Google. I'm using Authentication and Database. I noticed that the app startup time is very bad, roughly around 20secs for first start up and around 5-10sec for every start after. </p>

<p>Things I already did/tried:<br>
1. I first thought it was a problem with my phone but the numbers are around the same on other phones too - emulators included. My network speed is pretty good and should not be a problem.<br>
2. I made another test app, with just the bare minimum for auth and database and one activity to see if there was something wrong with my app, but the same numbers again. <br> 
3. Added a few log statements in my launcher activity. I noticed that my activities <code>onCreate</code> is called only after all of google and firebase stuff is initialised.<br> 
4. I tried putting a splash screen to show up while I check if a user is signed in, but that hardly helped as the splash screen is shown only after firebase is done loading and only for a nano second.(with reference to the above point, <code>onCreate</code> is called only after firebase is done, therefore, <code>setContentView</code> is also called after that) </p>

<p>What happens on startup: I just get a white page with the notification bar for around 5-10secs on each start up. </p>

<p>Any idea what I can do to improve the start up time? </p>

<p><strong>UPDATE:</strong> Just found out that none of the <code>Firebase</code> components were the problem. The problem was because of Instant Run. Read somewhere that instant run delays app startup time, <em>only when it is run in debug mode</em>. Tested the app without instant run, works like a charm!</p>