Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Volley can't handle "big" json #80

Closed
ben-j69 opened this issue Jul 28, 2015 · 4 comments
Closed

Volley can't handle "big" json #80

ben-j69 opened this issue Jul 28, 2015 · 4 comments

Comments

@ben-j69
Copy link

ben-j69 commented Jul 28, 2015

If you do this request with volley https://maps.googleapis.com/maps/api/directions/json?sensor=true&origin=48.8256676,2.383315000000001&destination=50.6293797,3.0570117&alternatives=true

WIth a StringRequest or JsonRequest, a timeout occurs.

@sewar
Copy link

sewar commented Aug 21, 2015

I'm facing this issue too, timeout counter should stop when the response is received from server/cache.

@davidjorgensen
Copy link

actually volley is not meant to be used for large data, and it will perform horribly (or not work properly) when trying.. You are better off using something else when loading huge content.

@Spring-Xu
Copy link

I agree with @davidjorgensen ,Volley is meant many small requests.

@mcxiaoke
Copy link
Owner

mcxiaoke commented Sep 8, 2015

@ben-j69 volley store whole http response contents as byte[] in memory and then convert to String or Json or other type, so it can not handle huge response, you should use okhttp instead.

// in BasicNetwork line 129
responseContents = entityToBytes(httpResponse.getEntity());

@mcxiaoke mcxiaoke closed this as completed Sep 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants