2

Currently I am using in my app Volley+HttpUrlConnection as http client, but sometimes is a little slow and I can't cancell requests.

So looking for another client i find OkHttpClient, some people recommend this and (Retrofit), I am good with Volley and i dont think to change right now.

So my question is:

What are the benefts using OkHttpClient with Volley? faster?

I have tried to find another OkHttpClient and all recommend this one.

Adrian Cid Almaguer
  • 9,598
  • 13
  • 48
  • 65
Max Pinto
  • 1,443
  • 3
  • 13
  • 28
  • I ve been wondering about this too, I ll be following the answers for this question, thanx for asking ^^ – Anis LOUNIS Aug 23 '15 at 19:04
  • You are welcome. Actually i have implemented Volley and OkHttpClient, and i feel better, faster,such as major performance, cancelable aniwhere. – Max Pinto Aug 23 '15 at 21:00

1 Answers1

1

(from volley google i/o video):

In nutshell:

Volley is:

  • Great for rpc-tyle network operations that populate UI.
  • Fine for background RPCs.
  • Terrible for large payloads.

In Volley everything happens in the memory so that isn't great for large data downloading (such as a big image or streaming contents).

Take a look at this question

Community
  • 1
  • 1
Anis LOUNIS
  • 4,472
  • 5
  • 30
  • 58