开发者

How much json via ajax request is too much?

I am using jquery and datatables to generate larges html tables. Current, I am providing all table data to each table in one json array from an ajax request.

With 1000 records, the transfer and rendering is very quick, but the list used on the table is growing very fast and 开发者_JAVA技巧I am worried it might get out of hand, then I would have todo some server side pagination.

What is an acceptable data limit to any ajax json response?


Ultimately the measuring stick isn't data size but the following...

  1. The perceived load time of the page. It should be pretty easy to mock up a page with 1000, 5000, 10000, 50000 records. Navigate to it and see how long it takes to load. You could play some tricks here: animated gifs, fetch the data in chunks and dynamically add (never ending page)...etc.

  2. The amount of information presented may eventually become over whelming. Finding the optimal presentation of the data (does all the data need to be presented, can a subset be loaded later...etc).

I agree that pagination will probably be a solution.

Bob

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜