Using ajax how to get response from the server servlet as xml that contains more than 50000 records. If i try show that records in user interface it is very slow and freezed how to avoid it.???
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
jsonp is much faster that ajax. The reason is that most browsers parse
javascripttags really fast. See here, http://devlog.info/2010/03/10/cross-domain-ajax/ to get started (Solution 2 which deals with implementing jsonp.The downside to this is that you need to modify your server.
You could also load less records, or use paging.
EDIT — to use paging you are going to need to create a server endpoint that supports some sort of api fields like
startandsize. So you would dothis means that the server should return 100 elements of data starting at the first. if you changed start from 0 to 1000, it would return 100 elements starting at the 1000th element.
Its just a simple ajax call. The only thing you do differently is tell the server how much data you want, starting where, by adding those parameters to your request.
Your UI will have a table with some sort of ‘next’ and ‘previous’ page buttons