Dynamic creation of large html table in javascript performance

前端 未结 7 1356
轻奢々
轻奢々 2020-12-02 23:30

I have an application which is used for data analysis and I\'m having a few performance issues with the creation of the table. The data is extracted from documents and it is

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-03 00:31

    Answering to get formatting

    What happens if you do

    for(var i in data){
        var record = data[i];
        var recordId = record.id;
        rows += '';
        rows += '' + recordId + '';
        rows += '' + data[i].status + '';
        rows += '' + record.name + '';
        rows += '';
        rows += '';
        rows += '';
        rows += '';
        rows += '' + record.origin + '';
        rows += '';
    }//end for
    

提交回复
热议问题