Do we need to use background thread for retrieving data using firebase? : <p>I've an android app where I'm retrieving data into a Fragment. And I believe that Firebase manages its asynchronous calls. But still I've doubt the if we need to write the Firebase code in the background thread or not?.</p>

<p>If we need to write it into the background thread then can you please tell which operations takes more time. eg:</p>

<pre><code>mDatabase = FirebaseDatabase.getInstance().getReference().child("Blog");
</code></pre>

<p>I think that performing this on the main UI thread may become risk full because setting connection between database may sometime take large time.</p>
