Domanda

I need to show millions of records in table with pagination.

so would like to know which one would be better option based on performance.

1.Jquery jqGrid

2.Alloy UI datatable

3.DataTables

Environment:Liferay 6.0 CE

È stato utile?

Soluzione

It wouldn't matter much: If you transmit millions of records to the client, then rely on any JS library to do the pagination, you'll run out-of-memory on the browser soon (if your users are patient to wait for the data to be transferred).

You're rather looking for a mix of server- and client-side pagination and dynamic loading. In there I'd recommend to go with the library and server-side framework that you're most familiar with, because the amount of data you're transferring does not justify going for "performance optimization". Not transferring everything is the optimization you can do in terms of performance - not the choice of JS-library

Altri suggerimenti

Do you have a monitor which can display millions records of data in a table without the pagination?

Do you know a user who will read all the million records of data?

If you answer on both the questions with "No" then it should be clear for you that you need pagination definitively.

If you would thought about the problem more you will understand that no user will look through all pages of the million rows. So one have also no sense to display millions records event with pagination.

What one probably need is to have an flexible way to filter or to search in the dataset. In the case it could be displayed only a few rows of data. So the user should become some controls like in searching toolbar and should get some searching dialog (simple one or complex) which could be used by the user to filter the data. You can provide some kind of problem oriented searching templates. See here an example of the usage templates in jqGrid. I make all references based on jqGrid, but the same problem exist in any kind of tables which you would use.

In any way you should change your original question and consider some alternatives which provide the user GUI to analyse the data with respect of some filters instead of just displaying a lot of unneeded information in the grid.

Why don't you like the liferay taglib to show your datas? Liferay has a search-container taglib that allow you to build your custom base/advanced search form and to display paged result of the filtered data. It also allow users to select their preferred page size from 5 up to 75 (but i think the limit may be programmatically modified)

It is very easy to implement and you can find some examples of taglib usage into liferay sourcecode.

Base search container (without search form) can be done with 3 tags, just few lines of jsp code...

I can post an example if you like..

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top