asyncExec()
on t开发者_开发问答he display putting expandAll()
inside the run()
method, but it didn't help. And it doesn't solve the first problem where I want to expand only one item. Any ideas?
Additional node: The slow expansion of an item happenes only the first time I expand it. All later expansions of the same item (after collapsing it) are fast.
I solved performance issues with large trees by change the content provider to an ILazyTreeContentProvider
. This won't help if you have to expand the full tree at once.
An alternative: Have a closer look at your content and label providers. Maybe their operations are too expensive and you can speed up things if you cache or pre-calculate some information for the tree. If, for example, you have a normal (non-lazy) content provider that loads the items from a database (one-by-one), expanding the tree will take forever...
Are you loading the model items in the UI thread? You should ideally load your model items in a non-UI thread and then update the tree with the items in the UI thread.
精彩评论