Recommended way to use IOutlineTreeProvider.Background [message #1826900] |
Mon, 04 May 2020 05:16  |
Eclipse User |
|
|
|
We noticed that opening an Xtext editor can cause UI freezes due to synchronous outline computation. Next we found the marker interface IOutlineTreeProvider.Background which allows to push outline computation to the background.
Seeing that IOutlineTreeProvider.Background is not added by OutlineTreeProviderFragment2, I wonder if for some reasons this interface is not recommended, or would it make sense to make it the default?
We actually saw a few deadlocks when blindly using IOutlineTreeProvider.Background, but we found that the real culprits where in our own code. Is risk of deadlock one reason why this is not the default?
Does anyone know best practices of using IOutlineTreeProvider.Background without risk of deadlock? For example, in one situation we observed the outline needing the UI thread for creating icons, I don't remember if this surfaced as illegal thread access or used syncExec, thus risking deadlock. Perhaps, background outline requires a specific style of label provider?
Lastly, I wonder what is the relation between Background (since 2.8) and BackgroundOutlineTreeProvider (since 2.4). Which one of these should be preferred nowadays?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04409 seconds