ArminKH Well-Known Member May 10, 2015 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User May 10, 2015 #2 You can download 100 items each time. If the user scrolls to the last page, download another 100 items. Upvote 0
You can download 100 items each time. If the user scrolls to the last page, download another 100 items.
ArminKH Well-Known Member May 10, 2015 #3 @Erel Why we cant to download all items together and then add 10 of them to scroll view each time? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 10, 2015 #4 You can. I understood from your question that the json string might be too long so it might be slower. Upvote 0
You can. I understood from your question that the json string might be too long so it might be slower.
ArminKH Well-Known Member May 10, 2015 #5 @Erel yes it can be longer but if we download all items together then thats not possible to crash?(force close) Upvote 0
@Erel yes it can be longer but if we download all items together then thats not possible to crash?(force close)
DonManfred Expert Licensed User Longtime User May 10, 2015 #6 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
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.
ArminKH Well-Known Member May 10, 2015 #7 DonManfred said: 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. Click to expand... 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
DonManfred said: 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. Click to expand... 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