开发者

Sorting/Displaying a large data set within a browser - how much JSON is too much?

This is a technical question regarding browser limitations for parsing and sorting JSON.

We are looking at performing a clustering algorithm on large data sets (potentially 50k rows, potentially 10 fields per row) that are returned from a query and displayed to users in a table, 25 rows per page, and sortable on all fields. The clustering will take place server side and then send back the client the clustered results as JSON.

Currently, the clustered result data will not be existing within any database table. This creates some issues for sorting and paging, and back button support too.

Instead of rerunning the query for "next page" and "resort", I'm wondering if I could send all the data back at one time as a potentially very large JSON, and开发者_运维百科 then displaying only 25 records at a time to implement paging. But what about when a user wants to resort? Could a browser handle resorting 50k+ rows? And still maintain the paging feature?

Would it just be better to create a temp table for the users query results?


you might get a faster result with jsonp. I don't know if there any limits on size, other than practical, since you basically make the browser treat the json as a script. You would have to process the result into some sort of data structure to support your paging, but that shouldn't be difficult.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜