Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT.VIRTUAL and Lists
SWT.VIRTUAL and Lists [message #1038296] Wed, 10 April 2013 13:37 Go to next message
Ice Man is currently offline Ice Man
Messages: 3
Registered: February 2013
Junior Member
I have a ListViewer that can potentially have 100k elements at runtime.

There are some performance issues when the data set gets this large, and while doing some reading I noticed that SWT Tables and Trees can be virtualized but there is no mention of Lists.

Is it possible to use the SWT.VIRTUAL style with a List?
Re: SWT.VIRTUAL and Lists [message #1038678 is a reply to message #1038296] Thu, 11 April 2013 02:59 Go to previous message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2013-04-10 19:37, Ice Man wrote:
> I have a ListViewer that can potentially have 100k elements at runtime.
>
> There are some performance issues when the data set gets this large, and
> while doing some reading I noticed that SWT Tables and Trees can be
> virtualized but there is no mention of Lists.
>
> Is it possible to use the SWT.VIRTUAL style with a List?

Have you consulted the documentation of org.eclipse.swt.widgets.List
before?

IMO the spec is clear, that SWT.VIRTUAL is not supported. In addition to
that we find (which is non-conclusive alone, but strengthens my previous
assertion) the following specified for class SWT:

/**
* Style constant to allow virtual data (value is 1<<28).
* <p><b>Used By:</b><ul>
* <li><code>Table</code></li>
* <li><code>Tree</code></li>
* </ul></p>
*
* @since 3.0
*/
public static final int VIRTUAL = 1 << 28;

I recommend to replace your List by an SWT TableViewer with SWT.VIRTUAL
flag. It is quite easy to make Table look like a list by simply using a
one-column table without column headers.

- Daniel
Previous Topic:Scale widgets are slow when inside tabs
Next Topic:SWT Javadoc
Goto Forum:
  


Current Time: Wed Jul 30 23:29:34 EDT 2014

Powered by FUDForum. Page generated in 0.11166 seconds