Skip to main content


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 17:37 Go to next message
Ice Man is currently offline Ice ManFriend
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 06:59 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
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: Fri Apr 19 14:03:29 GMT 2024

Powered by FUDForum. Page generated in 0.01669 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top