You can decrease the time it takes to initially display data in a table by creating a table that pages and trims the data it displays.
Paging data means that instead of showing all the rows of the table when a user first opens it, you specify a number of rows to display per page and enable users to page through the table. Limiting the number of rows per page enables the page to display more quickly because it has less data to retrieve initially. It also makes the table easier for users to read and use. Trimming data means that the table does not store any data in memory that does not need to be displayed immediately. For example, if an entry has child documents, but the entry is collapsed, a trimmed table does not store the child entries in memory, but instead retrieves them at the time that the row is expanded. By default, the table control stores all data related to the currently displayed page in memory.
To optimize table performance:
Parent topic: Content provider
- Implement the com.ibm.rcp.jface.viewers.IPagedContentProvider interface.
- Use the void setItemTrimming(boolean enabled) method to enable automatic item trimming in virtual tables.