J
J
jtag2018-05-06 15:35:39
Layout
jtag, 2018-05-06 15:35:39

How to quickly draw a table with 10,000 rows?

At the moment, it is implemented approximately in a cycle like this: When the user selects other values, new values ​​are loaded from the database in a cycle, a table is created with filling in the cells. All of this is noticeably annoying. Used fast jquery DataTables. But then they refused it. Is there a way to speed up table creation?
$table.append('<td>' + array[count] + '</td>');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2018-05-06
@Sanasol

no need to draw a table with 10,000 rows, no one ever works with everyone at once. It doesn't make any sense at all. (Do you know at least one real case when you need to immediately and simultaneously load and work with so many rows?)
If there is a lot of data, there is a load when scrolling, page-by-page display, filters for selecting a small data set, etc.
In large frameworks, this is solved by rendering only what is visible on the screen 10-20 lines.
The rest is not actually hidden behind the scroll, but is not displayed on the page at all.
And the scroll is completely virtual.
https://datatables.net/extensions/scroller/example...

0
0xD34F, 2018-05-06
@0xD34F

Obviously, the user will not be able to perceive 10,000 lines of data at once. That is, the task itself is idiotic, it is NOT NECESSARY to solve it. Do pagination, 30-50-100 lines will be displayed at an acceptable speed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question