Loading big data in jquery

I have a web service that returns data, a fairly large set, maybe 600 rows, on 20 columns. What is the fastest most efficient way to load this data into an html table in jQuery code?

I tried to create an html table by going through the returned data and creating a DOM table inside the row, but part of the loop is very slow. I heard about jQuery Templates, but I'm not sure if this technology is fast enough for large datasets ....

thank

+3
source share
4 answers

- , HTML? JSON . HTML-, element.html(data) .

: JSON HTML, : 1, 2, 3, 4, 5

+2

, . 600 x 20 . , ( ), .

webservice . Ajax.

+1

I think that here JSON DB might be the best ... you can write a server page that responds with json db formatted data for multiple lines. Then make your own ajax code to load the rows and process them in your choice of display model, for example your own <table>using "overflow:auto;", and add the rows to this table in pieces .. or use something like the "Infinite Scroll" is already offered.

0
source

Source: https://habr.com/ru/post/1783331/


All Articles