Android Question json limits

ArminKH

Well-Known Member
Hi every body
I have a question about json
I have a php page on my server and when my user do search on client side that page return results to json encode
i want to download results by httpUtils my resluts is a name a family an a profile picture and finaly i want to add this informations to a panel and then add this items to a scroll view
Now i have two solution
1:download all search's results from server side and then add 10 or 15 item to scroll view at same time (10 item per each scroll)
2:download 10 item from server side per each scroll and add them to scroll view

Which way is better?
If i use solution 1 then maybe my search reault be about 1000 item and my data's(json string) lenght be too large
If i use solution 2 then maybe my connection to my server be too much than usual(1 connect for each scroll)and then maybe my server be so busy

Please help me or suggest better solution
Excuse me for my english
Tnx all
 

ArminKH

Well-Known Member
@Erel Why we cant to download all items together and then add 10 of them to scroll view each time?
 
Upvote 0

ArminKH

Well-Known Member
@Erel yes it can be longer but if we download all items together then thats not possible to crash?(force close)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The question is what you ae doing with that json.....
Most probably it is NOT the download of 1000 items at once which causes an error.
 
Upvote 0

ArminKH

Well-Known Member
The question is what you ae doing with that json.....
Most probably it is NOT the download of 1000 items at once which causes an error.
my question is about a solution which is fast,smooth,usual and has minimum server cpu and ram usage.
Ok thank u both as erel said it's better to download 100 item each time :)
 
Upvote 0
Top