5 Replies Latest reply on Feb 6, 2009 4:53 PM by Nick Belaevski

    Data table with large number of rows

    Martin Dubuc Newbie

      I have implemented a data table using the rich:dataTable component and am also using the rich:dataScroller to only present portion of the table when the number of records doesn't fit in a single page. This table potentially has a very large number of rows. To avoid loading the whole table in memory, the code that backs this table uses CachedRowSetImpl and the ResultSetDataModel. However, I get a Java heap space error when I try to display the table and the number of rows gets in the hundreds of thousands, so I suspect that, even though I use a CachedRowSetImpl and I limit the number of rows to display per page to 20, the whole table is still loaded in memory. I am wondering if someone has written an implementation that is memory efficient (only loads the records that are shown to the user) and uses a scroller and would want to share their code in this forum (or point me out to some link that describes a solution for this problem).

      I also am wondering if it is a good idea to use CachedRowSetImpl because I get some warning during compile that states that this class is proprietary to Sun and may not be available in the future.

      Thanks,

      Martin