Question

Question

TrollchikTrollchik Posts: 80Questions: 1Answers: 0
edited September 2011 in General
hi Allan!
such question: fnClearTable and fnAddData takes about 3-4 seconds to refresh the table. And during this time the browser buzz.. (scroll can't be moved and so on...)

Is it possible don't freeze the browser during this time ?

Replies

  • GregPGregP Posts: 500Questions: 10Answers: 0
    Performance is always going to be related to a combination of factors:

    JavaScript engine performance (ie. how fast can your browser process JavaScript)
    Client equipment (how fast is your computer, period; although JS is lightweight so not a big deal)
    Size of the data set

    The last one is probably the most likely culprit if it's taking you 3-4 seconds. DT is a very fast script, and the only way I can see it taking that long is if you have a huge data set and/or you are engaging in extensive DOM manipulation on that large data set.

    In any event, that's not quite the main point, which is-- there's no way Allan is explicitly telling the browser "lock during this operation!", so if there's a lock-up it's strictly up to the browser to resolve; DT can't do this.
  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin
    Yup - Greg is (as usual) bob on. One thing to ask though is how many rows you are adding? It could be that you will see a _massive_ performance improvement if you use deferred rendering: http://datatables.net/release-datatables/examples/ajax/defer_render.html .

    Allan
This discussion has been closed.