T
T
Thomas Jefferson2021-10-12 15:31:46
Frontend
Thomas Jefferson, 2021-10-12 15:31:46

How to optimize the long page of the site?

I have a table site that has a form for entering data rows to be loaded for this table, and when more than 1000 rows are loaded, there is a delay in rendering the page, about 3 or more seconds, and after rendering the page starts to lag, how to optimize it, and how to put the loading gif before rendering all the data requested by the user?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2021-10-12
@rPman

Do string preloading, i.e. instead of 1000 rows, immediately load 2000 or more (select empirically according to the style of using the table), but continue to show only 1000 as a window among those already loaded.
When scrolling down, run an ajax request to load data below, when scrolling up - above, so while the user is looking at the data, the application loads them.
ps So your rendering slows down? 3 seconds is a lot, what are you doing there?

V
Vasily Vasilyev, 2021-10-12
@Basil_Dev

Rendering a large number of lines greatly reduces performance, try not to display all lines at the same time. You can use either like this or google 'js virtualized scroll table'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question