Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] inefficient TreeItem

Hi,

I was planning to use the SWT Tree for showing some amount of data (not huge, but big amount).
I have to parse a file and create item for each token.
The biggest file I have is having 40k tokens.
While parsing the file for tokens (some small string processing algorithm) happens within 2 seconds, creating 40k itmes takes around 40 seconds!!!

I understand that creating a TreeItem is definitely lot more work than parsing a token, but still.
Can it not be made faster such that all 40k items are made within 5 seconds?
(Maybe some kind of delayed painting of items (not creation) would help. Any Ideas?)


I use the following line of code to create the TreeItem:
    TreeItem tree_item = new TreeItem (tree, SWT.NONE);

Regards
Techieeee

Back to the top