jQuery UI Widgets Forums DataTable Performance AddRow

This topic contains 4 replies, has 2 voices, and was last updated by  Hristo 3 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Performance AddRow #90405

    Matthias
    Participant

    I have an datatable with a pageSize of 10 und 3 columns.
    When I perform a search in my webapplication it is performed on servererside an the results are added to my datatable. Therefore I invoke addRow in a for – loop.
    When I only get a few results (1000 and lower) everything is fine.
    When I get 10.000 results it takes about 2 Minutes to fill the datatable.

    On the same webapplication I have an treeGrid. This treeGrid is also filled inside a forloop with the searchresults with addRow. When I get 10.000 results it takes less the 5 seconds.

    Is there a way to speed up the datatable or is it a bug? I also tried to use beginUpdate / endUpdate but with no success.

    Performance AddRow #90409

    Matthias
    Participant

    I created an example on JSFiddle, that shows the problem. There it only takes 30 seconds, but you can see, that time is rising.

    • This reply was modified 3 years, 7 months ago by  Matthias.
    • This reply was modified 3 years, 7 months ago by  Matthias.
    Performance AddRow #90519

    Hristo
    Participant

    Hello Matthias,

    You try to add a new row in each iteration and this slowed the process.
    Please, take a look at this example.
    Also, will be better if you load data before initialized the DataTable.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Performance AddRow #90568

    Matthias
    Participant

    Thank you. I didn’t know that I can give an array to addRow.
    Loading the data before initialization of the table isn’t possible in my case, because I initialize an empty table. And after userinteraction I get the items from server.

    Performance AddRow #90691

    Hristo
    Participant

    Hello Matthias,

    You could use and this approach – change the source and updateBoundData method.
    Please, take a look at this example:
    http://jsfiddle.net/Lmxb0482/
    Hope this help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.