Skip to content

symbols view in Eclipse seems to slow down (block) the overall UI #1416

Closed

Description

@martinlippert

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

Activity

  1. added this to the 4.27.0.RELEASE milestone on Nov 26, 2024
  2. martinlippert commented on Nov 26, 2024

    @martinlippert
    MemberAuthor

    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)

  3. BoykoAlex commented on Nov 26, 2024

    @BoykoAlex
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsetheme: spring index & symbolstype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions