title: Creation of AsyncTask taking too much time Android
body: <p>I am making a network call in an  AsyncTask, but the problem i am facing is the amount of time it is taking to start the doInBackground method.</p>
  
  <p>Here is a part of my code:</p>
  
  <pre><code>    button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Log.d("Temp:",System.currentTimeMillis()+"");
                  new Move().execute();
                  /*some other logic
              }
      }
  </code></pre>
  
  <p>And my AsyncTask is:</p>
  
  <pre><code>    private class Move extends AsyncTask&lt;Void, Void, Void&gt; {
      @Override
      protected Void doInBackground(Void... temp) {
          Log.d("start:",System.currentTimeMillis()+"");
          gson.fromJson(Web.Request.get(some_URL),Void.class);
          Log.d("end:",System.currentTimeMillis()+"");
          return null;
      }
  }
  </code></pre>
  
  <p>These are the logs i got:</p>
  
  <pre><code>           32658-998/com.example.game D/temp:﹕ 1408923006159
             32658-998/com.example.game D/start:﹕ 1408923035163
             32658-998/com.example.game D/end:﹕ 1408923035199
  </code></pre>
  
  <p>So actually it took almost 29 secs to reach the first line in doInBackground method, where as it took just 36 ms to finish the network call. I tried it many times, the time taken is almost in the same order.</p>
  
  <p>Is it possible to start the AsyncTask immediately? Or is there any other way to solve this problem.(other than a running a simple thread?)
  Thank you :)</p>