Alidad
Alidad

Reputation: 5538

How to display large list in the view without using database slicing?

I have a service that generates a large map through multiple iterations and calculations from multiple tables. My problem is I cannot use pagination offset to slice the data because the data is coming from multiple tables and different modifications happen on the data. To display this on the screen; I have to send the map with 10-20,000 records to the view and that is problematic with this large dataset. At this time I have on-page pagination but this is very slow and inefficient. One thing I thought is to dump it on a table and query it each time but then I have to deal with concurrent users.

My question is what is the best approach to display this list when I cannot use database slicing (offset, max)?

I am using grails 1.0.3 datatables and jquery

Upvotes: 0

Views: 743

Answers (2)

Alidad
Alidad

Reputation: 5538

I end up writing the result of the map in a table and use the data slicing on that table for pagination. It takes some time to save the data but at least I don't have to worry about the performance with the large data. I use time-stamp to differentiate between requests. each requests will be saved and retrieved with its time stamp.

Upvotes: 0

user852518
user852518

Reputation: 501

Maybe SlickGrid! is an option for you. One of there examples works with 50000 rows and it seems to be fast.

Christian

Upvotes: 1

Related Questions