use of org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider in project nebula.widgets.nattable by eclipse.
the class ListDataProviderPerformanceTest method performanceOfGlazedListDataProvider.
// Bench marked ~ 45 milliseconds. Intel 2GHZ, 2GB Ram
@Test
public void performanceOfGlazedListDataProvider() throws Exception {
String[] propertyNames = RowDataListFixture.getPropertyNames();
Map<String, String> propertyToLabelMap = RowDataListFixture.getPropertyToLabelMap();
List<RowDataFixture> largeList = RowDataListFixture.getList(26000);
Assert.assertTrue(largeList.size() > 25000);
IDataProvider glazedListsDataProvider = new GlazedListsDataProvider<RowDataFixture>(GlazedLists.eventList(largeList), new ReflectiveColumnPropertyAccessor<RowDataFixture>(propertyNames));
IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(propertyNames, propertyToLabelMap);
this.layer = new DefaultGridLayer(glazedListsDataProvider, columnHeaderDataProvider);
}
Aggregations