My data interacts with the background java code through jquery's ajax method. I do a for session in the java code, and use stringbuffer append to process the json data to generate a table (about 1000 rows of data), and return the table as a string. On the page, I put the returned text in the form of innerHTML in a custom place in the div. Since the frontend takes 10 seconds or 15 seconds to refresh, other operations on the page cannot be operated when an ajax request is made.
I also tried to use JavaScript at the front desk to get the json object returned by ajax and generate a table on the client. This is even less efficient. It usually causes the client to crash.
I don’t know if any heroes have encountered this problem or have a good solution. I would like to thank you for your help.
reply:
10~15 Refresh 1000 rows, this is the key,
Why do you return 1000 rows every time?
There are 1,000 rows for the first time, but there is no way for the second time. Have these 1,000 rows changed?
A timestamp should be used. The background only returns data that has changed after this timestamp, and then updates the timestamp.