Row insert performance on IE

Row insert performance on IE

Worthy7Worthy7 Posts: 8Questions: 3Answers: 0

I know I know, it's been talked about to death.
First question, because I cannot find the place in code:

1) Does DT create all the html for a page first and then insert it into the dom, or does it push each row into the dom separately?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,457Questions: 1Answers: 10,466 Site admin

    If you have the deferRender option enabled, it will create the DOM elements for the rows to be displayed only. As more rows are displayed (e.g. by paging) the DOM elements are created as and when needed only.

    If you don't have that option enabled, they will be created immediately, which can be slow.

    Allan

  • Worthy7Worthy7 Posts: 8Questions: 3Answers: 0

    I understand that, but my question is just about when they are inserted. Assuming defer is enabled, are the rows for the page created in JS, and then when all the HTML has been created are then inserted? Or is each row inserted the moment after it is created?

  • allanallan Posts: 63,457Questions: 1Answers: 10,466 Site admin
    Answer ✓

    They are all inserted together after all of the rows that are needs for the current display have been created.

    This is the code where that happens. It loops over the current display, creates the rows if needed, inserts each one into an array, and then the array is inserted into the document all together on line 441.

    Allan

This discussion has been closed.