title: HttpClient is extremely very slow - Xamarin Forms
body: <p>I'm trying to download some json from a url. 
  I'm debugging the app through my Samsung device, but for some reason, httpclient takes very long to download the data. </p>
  
  <p>When I set the timeout using TimeSpan.FromMinutes(30), httpclient takes very long which is not practicable. When I remove the timeout, however, I get TaskCancelled exception which the try catch block catches.</p>
  
  <p>Has anyone seen this behavior before?</p>
  
  <p>Tried checking the permissions: The only permission the app needs is the internet which by default is granted in the debug mode.</p>
  
  <p>Any help would be appreciated. Thanks!</p>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <p>This is the class responsible for downloading the data:</p>
  
  <pre><code> public static class DataSource
      {
          public async static void LoadFrom()
          {
                 var uri = new Uri("https://api.coinmarketcap.com/v2/ticker/?convert=usd&amp;sort=price");    
              try
              {
                  bool isConnected = CrossConnectivity.Current.IsConnected;
                  HttpClient myClient = new HttpClient(new Xamarin.Android.Net.AndroidClientHandler());
                  var response = await myClient.GetAsync(uri);
                  if (response.IsSuccessStatusCode)
                  {
                      var Data = await response.Content.ReadAsStringAsync();
                      var CoinMarketCapObject = JsonConvert.DeserializeObject&lt;CoinMarketCap.CoinMarketCapCurrencyData&gt;(Data);
                      List&lt;Currency&gt; currencies = new List&lt;Currency&gt;();
                      if (CoinMarketCapObject != null)
                      {
                          foreach (var Datum in CoinMarketCapObject.Data)
                          {
                              currencies.Add(new Currency(Datum.Value.name, Datum.Value.symbol, Datum.Value.quotes.USD.price));
                          }
                      }
                  }
              }
              catch (TimeoutException ex)
              {
                  // Check ex.CancellationToken.IsCancellationRequested here.
                  // If false, it's pretty safe to assume it was a timeout.
              }
              catch (TaskCanceledException ex)
              {
                  // Check ex.CancellationToken.IsCancellationRequested here.
                  // If false, it's pretty safe to assume it was a timeout.
              }
              catch (Exception e)
              {
                  Debug.Print(e.Message);
  
              }
          }
  
      }
  </code></pre>
  
  <p>I'm calling the LoadFrom method from the OnStart Method.</p>
  
  <pre><code>protected override void OnStart ()
          {
              // Handle when your app starts
              API.DataSource.LoadFrom();
          }
  </code></pre>