Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bServerSide for datatables #126

Open
jean opened this issue Jul 12, 2012 · 4 comments
Open

Support bServerSide for datatables #126

jean opened this issue Jul 12, 2012 · 4 comments
Labels

Comments

@jean
Copy link
Member

jean commented Jul 12, 2012

When viewing a large view, a dynamic table becomes impractical (e.g. will freeze Chrome for a couple of minutes).

For this, views will need to expose an URL that returns blocks of JSON for the requested rows.

See http://datatables.net/usage/server-side

@ebrehault
Copy link
Member

True.
I will try that.
I guess we will have to adapt the live filtering mechanism (we cannot ask Plomino to return all the docs containing the letter 'a' if there are a lot of docs).

@ebrehault
Copy link
Member

ok done
I have tested with a view containing 45000 docs, it just rocks !

Note: filtering only works if local fulltext index is available, but if it is not (and you do not want to enable it), you may set bServerSide: false manually in the datatables settings.

@jean
Copy link
Member Author

jean commented Jul 17, 2012

Cool :)

@jean jean reopened this Aug 14, 2012
@jean
Copy link
Member Author

jean commented Aug 14, 2012

Currently every "Next" page will result in querying the catalog for all records that match the view, and creating a Batch instance with all records. So if a view has 10 pages, this will mean 10x more CPU used, and 10x claiming and freeing memory for search results and the Batch.

To mitigate this, a view that is being paged serverside should have a cache which has a tojson method which supports the bServerSide parameters for paging.

Since view results are the same for all viewers, there can be one cache which is invalidated when the view is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants