| Summary: | [Viewers] SWT.MULTI style Virtual TableViewer navigation performance is poor | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Charles Tuckey <charles> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | billy.biggs, charles, douglas.pollock, gunnar, michal.zan |
| Version: | 3.1.1 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-GTK | ||
| Whiteboard: | stalebug | ||
| Bug Depends on: | |||
| Bug Blocks: | 154755 | ||
Hitesh is now responsible for watching bugs in the [Viewers] component area. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug was marked as stalebug a while ago. Marking as wontfix. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag. |
My tests show that TableViewer performance begins to lag with large numbers of records but SWT Table handles it just fine. I have attached demo source code at the end of the message. What I have found is that the TableViewer does not scale well when the MULTI style is set. In fact, at 100,000 records it is not usable for arrow navigation. Without the MULTI style set it has acceptable performance. The navigation test I used is to select a record and then hold down the down-arrow key while watching the CPU usage and the responsiveness of the application. I expect the CPU usage to be reasonable, say less than 50%, and the application to keep up. (I am running FC4 on an AMD 3200+ CPU with 1 GB of RAM) My tests show that TableViewer begins to lag with large numbers of records but SWT Table handles it just fine. Here are my test results: JFace TableViewer (with MULTI/without MULTI) 10,000 rows, CPU (23%/1%), responsiveness OK 100,000 rows, CPU (96%/25%), responsiveness (awful/OK) SWT Table (with MULTI/without MULTI) 10,000 rows, CPU (1%/0.5%), responsiveness OK 100,000 rows, CPU (11%/0.5%), responsiveness OK ********** JFace TableViewer test code ********** import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; public class JfaceTable { public static void main(String[] args) { int itemCount = args.length == 0? 100000 : Integer.parseInt(args[0]); Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new RowLayout(SWT.VERTICAL)); TableViewer viewer = new TableViewer(shell, SWT.VIRTUAL); // TableViewer viewer = new TableViewer(shell, SWT.MULTI | SWT.VIRTUAL); viewer.getTable().setLayoutData(new RowData(200, 200)); viewer.setItemCount(itemCount); for (shell.pack(), shell.open(); !shell.isDisposed();) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } ********** SWT Table test code ********** import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; public class SwtTable { public static void main(String[] args) { int itemCount = args.length == 0? 100000 : Integer.parseInt(args[0]); Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new RowLayout(SWT.VERTICAL)); Table table = new Table(shell, SWT.MULTI | SWT.VIRTUAL); // Table table = new Table(shell, SWT.VIRTUAL); table.setLayoutData(new RowData(200, 200)); table.setItemCount(itemCount); for (shell.pack(), shell.open(); !shell.isDisposed();) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }