Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1084865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:36:59+00:00 2026-05-16T22:36:59+00:00

I have written a web service that returns some data as json. To display

  • 0

I have written a web service that returns some data as json. To display this in a table I am using the datatables jquery plugin:

for(var i=0;i<results.length;i++){
       myTable.fnAddData( [
       "<input name='codeSearched' type='radio' value='"+results[i].ID+"' />",
       "<span id='code_"+results[i].ID+"'>"+ results[i].code+"</>",
       results[i].description ] ,true);
}

This javascript seems to kill the browser. (20+ seconds on firefox for just a few thousand rows). I have loaded similar amounts of data into a datatables table before orders of magnitude faster by rendering it server side as an html fragment and inserting directly into the dom.

Can you recommend a way to get the best of both worlds? (I.e, call an ajax web service that serves data in an open structured format, but also parse and render quickly?

Thanks for any suggestions

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:37:00+00:00Added an answer on May 16, 2026 at 10:37 pm

    You will want to get some timing information to see how quickly your call comes back.

    There are two ways I do this, one is to use firebug to see how long it takes, and also to put in timing around my call so I can see how long from when I start the call to when I am actually done.

    If that is acceptable, then building the table is the problem.

    You will want to look at this article to ensure your technique isn’t killing you, timewise, as there is a different between using DOM functions and innerHTML.

    http://www.quirksmode.org/dom/innerhtml.html

    The next issue is that if you are trying to fully build the table, you will find that the browser won’t show it until you are done, and that can be a killer.

    So, what I have done in the past is to build it in pieces. So, I build up perhaps 100 rows, then use setTimeout so that the browser can display that, then I build the next batch, until I am done.

    This way the user can quickly see the first part of the table, and it should be done before they need the entire table built (such as if they need to look at the bottom row).

    How many rows to build at a time is a trade-off between user needs and performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a simplified Silverlight client library for my WCF web service using
I have written an application that connects to a SSL web service (including client
I have a web service written in C#. It behaves rather strange during pool
Question: I have written a console program that uses the SQL server 2005 web
I have written a RIA using flex for the front-end and Java servlet for
I've added a WCF service reference to a .NET project using this WSDL: https://interop.cmiservices.org/axis/services/CAP1_1?wsdl
I have a webservice that I'm using JAX-WS annotations to generate the WSDL &
I have created a JAX-WS client within eclipse that will communicate with a web
I am writing some validation code. The code will take data passed into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.