Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Nebula XViewer loads slowly when there are a lot of rows(XViewer performance)
Nebula XViewer loads slowly when there are a lot of rows [message #870498] Tue, 08 May 2012 08:49 Go to next message
Fabrizio Marini is currently offline Fabrizio Marini
Messages: 2
Registered: May 2012
Junior Member
Hi,

i have installed nebula (stable version) on eclipse 3.7.0 on windows 7.

I am running the example provided in org.eclipse.nebula.widgets.xviewer.example.source_0.9.9.201205011846.jar

MyXViewerTest.java

my issue is:
the more the rows inserted in the xviewer are, the slower it draws.

The example provides a table with 44 rows that works very fast, but if i increase the rows it gets slower according to the row count.

In MyXViewerTest.java i have modified line 88
from
for (int x = 0; x < 1; x++) {
tasks.addAll(getTestTasks());
}

to
for (int x = 0; x < 100; x++) {
tasks.addAll(getTestTasks());
}

Now, with 4400 rows it's very slow on loading (more or less 5 seconds), and if i try to sort a column it requires approximately 10 seconds.

I have tried to initialize the XViewer on line 71 with the VIRTUAL style
myXviewer = new MyXViewer(Shell_1, SWT.VIRTUAL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);

but nothing has changed.

Is there a way to improve the XViewer performance?

Thank you
Re: Nebula XViewer loads slowly when there are a lot of rows [message #874920 is a reply to message #870498] Mon, 21 May 2012 15:59 Go to previous message
Donald Dunne is currently offline Donald Dunne
Messages: 191
Registered: July 2009
Senior Member
XViewer uses a class called XViewerSorter which extends off ViewerSorter. For the string case, it pulls both strings from the label provider and then compares them.

You can extend XViewerSorter to provide your own implementation for sorting. Doing this would allow you to use the classes of the objects you provided to the viewer. This might speed things up if you can do something other than a string compare.

I'm open to suggestions if you or someone else wants to take a look at XViewerSorter and provide improvements to performance.

Don
Previous Topic:GridTableViewer and sorting
Next Topic:Support for Linux
Goto Forum:
  


Current Time: Wed Apr 16 12:11:13 EDT 2014

Powered by FUDForum. Page generated in 0.02130 seconds