locked
Ajax issue: delay in getting data from web service using innerHTML, please guide RRS feed

  • Question

  • User-245554983 posted

    I am working on an ajax application which will display about a million records in an html table. Web service returns records from server, I build a logn string by concatinating data and tags and than put this string using innerHTML (not using DOM for getting better performance).

    For testing I have put 6000 recods in database (stored procedure takes about 4 seconds in completion of its execution).

    While testing on local system (database and application on same machine) it took about 5 minutes to display the records in page. After deplying on web server it did not responde even for more time. It looks very low performance. I put records in a CSV file and its weight was less than 2 MB. I couldn't understand why string concatinations to build html table and putting string in innerHTML is taking such a huge time (if it is the issue). Requiment is to show about million records in web page but performance on just 6000 records is disappointing. I am not gettign what to do to increase performance.

    Kindly guide me and help me.

     

    Tuesday, September 14, 2010 9:47 AM

Answers

  • User-315082118 posted

    Hi Yawer

    There’s really no way to get good performance when sending 6,000 records from the server to the client and with 1,000,0000 records your application will just not work, you should use pagination for something like this.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 14, 2010 11:23 AM
  • User-315082118 posted

    I really don’t see a way to send a million records at once to the client over the internet, the implementations you mentions surely use some kind of pagination. The problem your are finding is not really with the DOM but with sending a million records over the internet, remember in a Web application the slowest part is always the sending of data from one place to another, surely the stored procedure gets the records in 4 seconds in the server, but sending these same records to a remote user in the Internet will take a lot more time, and the farter the user is from the server the slower the application will look to her/him.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 14, 2010 2:09 PM

All replies

  • User-315082118 posted

    Hi Yawer

    There’s really no way to get good performance when sending 6,000 records from the server to the client and with 1,000,0000 records your application will just not work, you should use pagination for something like this.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 14, 2010 11:23 AM
  • User-245554983 posted

    Hi Elias,

    Very nice to see you again and thanks for replying. 

    Is there some patren that can help in performance ? While searching on internet I came to know some people have done such implementations where they had bulk records (say a million) in page and it worked fine.  But I couldn't find any detail on such implementation.

    Secondly have you checked Microsoft Ajax client side templates ? I thing it do not require DOM manuplation, is it ? If it do not require Dom manuplation will it speed up the application or not ?

    Please advise.

     

    Tuesday, September 14, 2010 1:44 PM
  • User-315082118 posted

    I really don’t see a way to send a million records at once to the client over the internet, the implementations you mentions surely use some kind of pagination. The problem your are finding is not really with the DOM but with sending a million records over the internet, remember in a Web application the slowest part is always the sending of data from one place to another, surely the stored procedure gets the records in 4 seconds in the server, but sending these same records to a remote user in the Internet will take a lot more time, and the farter the user is from the server the slower the application will look to her/him.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 14, 2010 2:09 PM