javascript - LoadingDisplaying large amount of data on webpage - Stack Overflow

I have a webpage which contains a table for displaying a large amount of data (on average from 2,000 to

I have a webpage which contains a table for displaying a large amount of data (on average from 2,000 to 10,000 rows). This page takes a long time to load/render. Which is understandable.

The problem is, while the page is loading the PCs memory usage skyrockets (500mb on my test system is in use by iexplorer) and the whole PC grinds to a halt until it has finished, which can take a minute or two. IE hangs until it is plete, switching to another running program is the same.

I need to fix this - and ideally i want to acplish 2 things:

1) Load individual parts of the page seperately. So the page can render initially without the large data table. A loading div will be placed there until it is ready.

2) Dont use up so much memory or local resources while rendering - so at least they can use a different tab/application at the same time.

How would I go about doing both or either of these?

I'm an applications programmer by trade so i am still a little fizzy on the things I can do in a web environment.

Cheers all.

I have a webpage which contains a table for displaying a large amount of data (on average from 2,000 to 10,000 rows). This page takes a long time to load/render. Which is understandable.

The problem is, while the page is loading the PCs memory usage skyrockets (500mb on my test system is in use by iexplorer) and the whole PC grinds to a halt until it has finished, which can take a minute or two. IE hangs until it is plete, switching to another running program is the same.

I need to fix this - and ideally i want to acplish 2 things:

1) Load individual parts of the page seperately. So the page can render initially without the large data table. A loading div will be placed there until it is ready.

2) Dont use up so much memory or local resources while rendering - so at least they can use a different tab/application at the same time.

How would I go about doing both or either of these?

I'm an applications programmer by trade so i am still a little fizzy on the things I can do in a web environment.

Cheers all.

Share Improve this question edited Jul 9, 2010 at 3:51 Brock Adams 93.6k23 gold badges241 silver badges304 bronze badges asked May 12, 2010 at 12:09 jb.jb. 1,9189 gold badges27 silver badges44 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 2

Regarding the first part, it's called Ajax: display the page without the table, or with an empty table, and then use ajax requests to fetch the data (in html or any data format) and display it.

Regarding the second part, you want something called lazyloading: the possibility to load data only when the user needs it, ie when it's on the visible part of the document. You can look at this question for a DataGrid library capable of handling millions of rows.

Two basic options:

  • Pagination
  • Lazy loading (load as user scrolls down). See this jQuery plugin

You could try a couple of things:

Loading data Asynchronously and Paging

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1741273590a4337892.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信