Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] JFace TableViewer with VIRTUAL sample

Hi,

I've been extremely pleased to see the VIRTUAL flag support added for the JFace
TableViewer starting with 3.1M3. It is very required to have well performing
tables in JFace.

My problem is that I cannot figure out how to use this feature. Or maybe I've
found a bug.

I created a sample view with a TableViewer in it using the Eclipse plug-in
creation wizard. In the resulting code I changed three things:

1. The TableViewer is created with the VIRTUAL flag:

new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.VIRTUAL)

2. The view content provider's getElements() method returns an array of 100,000
Strings.

3. I removed the sorter.

While the content is created in 1-2 seconds, when the VIRTUAL flag is set, the
display of the content takes a lot (around 1 minute). However, if the VIRTUAL
flag is not specified, the display is much faster (but not that fast - around
5-6 seconds).

What am I doing wrong? Why doesn't the VIRTUAL flag reduce the display time to
around 1-2 seconds? Isn't this what it's supposed to do?

Regards,
Robert


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250


Back to the top