You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
symbols view in Eclipse seems to slow down (block) the overall UI #1416
It looks like the symbols view in Eclipse slows down and blocks the UI when the selection changes. Here is what I observed:
having the symbols view open and switched to "project"
having various projects in the workspace
select a different project or a different editor from a different project causes the UI to freeze until the project view updated the list of symbols for the project
Further tests probably require emulating a large number of symbols, or the request to retrieve the symbols for a project from the language server taking a longer time. The important piece here would be to make sure that even if the call to the language server takes long, it does not block the UI (assuming that this is the reason the UI freezes)
It is definitely not related to fetching symbols from the LS. The fetching is done correctly is async fashion via AsyncLiveExpression. The only place in the code that stood out to me and is likely the culprit for using the UI thread via Symbols View was the SelectionTracker. There is a "selected resource tracker" LiveExpression that updates DocumentData. Creation of the new DocumentData loads the file content into document if there is no editor opened for the resource. I made the loading from content "lazy" thus the loading would occur the first time DocumentData.getDocument() is called. This is called off the UI thread for "file" mode of the Symbols View only. I think it is a good fix. Before to used to load docs regardless of the mode of the Symbols View.
The lazy loading: 2d78997
Fix the "file" mode of the Symbols View: 55bf699
Activity
martinlippert commentedon Nov 26, 2024
Further tests probably require emulating a large number of symbols, or the request to retrieve the symbols for a project from the language server taking a longer time. The important piece here would be to make sure that even if the call to the language server takes long, it does not block the UI (assuming that this is the reason the UI freezes)
BoykoAlex commentedon Nov 26, 2024
It is definitely not related to fetching symbols from the LS. The fetching is done correctly is async fashion via
AsyncLiveExpression. The only place in the code that stood out to me and is likely the culprit for using the UI thread via Symbols View was theSelectionTracker. There is a "selected resource tracker"LiveExpressionthat updatesDocumentData. Creation of the newDocumentDataloads the file content into document if there is no editor opened for the resource. I made the loading from content "lazy" thus the loading would occur the first timeDocumentData.getDocument()is called. This is called off the UI thread for "file" mode of the Symbols View only. I think it is a good fix. Before to used to load docs regardless of the mode of the Symbols View.The lazy loading: 2d78997
Fix the "file" mode of the Symbols View: 55bf699