Skip to content

[structure view] initial delay when opening the view #1690

Closed

Description

@martinlippert

When opening the logical structure view in VSCode for the first time, there is some initial delay before the tree shows up. It looks like this delay is not caused by the language server producing the tree information, but maybe on the client side. Probably worth to take a look what is causing this delay.

Activity

  1. added this to the 5.0.0.RELEASE milestone on Oct 23, 2025
  2. BoykoAlex commented on Feb 20, 2026

    @BoykoAlex
    Contributor

    @martinlippert is this when the view is opened initially? Or when the view is opened after the extension and boot ls is started?

  3. martinlippert commented on Feb 20, 2026

    @martinlippert
    MemberAuthor

    I am not 100% sure, but I think the delay happens when the view is opened for the first time (after the extension is already started and running). Probably something inside of the mechanisms on the language server side, taking a while to load catalogs and creating the tree, but that is just guesswork. In the end, this is a performance optimization effort.

  4. self-assigned this
    on Mar 9, 2026
  5. martinlippert commented on Mar 9, 2026

    @martinlippert
    MemberAuthor

    Looking at some early profiling data, walking through all the JARs from the projects to lookup and load the stereotype definitions takes quite a while. Will take a look possible improvements in this area.

  6. martinlippert commented on Mar 9, 2026

    @martinlippert
    MemberAuthor

    Looking at some early profiling data, walking through all the JARs from the projects to lookup and load the stereotype definitions takes quite a while. Will take a look possible improvements in this area.

    Although there might be some minor improvements possible in this area, this turns out to be not the real bottleneck. Creating the metadata for modulith projects takes most of the time (in my sample workspace with several modulith projects and a bunch of additional regular projects.

    In order to significantly improve this, we need to look into performance optimizations around getting the modulith metadata.

  7. martinlippert commented on Mar 9, 2026

    @martinlippert
    MemberAuthor

    Next insights:

    • if the command asks for multiple projects, the trees are computed sequentially
    • this basically means that calculating the modulith metadata for one project in that list causes all other remaining projects to wait

    Working on multiple projects in parallel when the command contains a list of projects helps here quite a bit. That piece should be incorporated. It also causes multiple calls to the modulith metadata service to be executed in parallel, which is good.

    Additional insights:

    • when I open the VSCode workspace with the logical structure view collapsed, the client still asks the server for the trees, so they are computed and delivered to the client
    • when I expand the view section of the logical structure view, the language server doesn't compute any trees anymore, but the UI still takes a while before showing all the trees.

    The question here is why the client takes quite some time to show the tree.
    For my testing, I have a number of larger projects in my workspace, to maybe you need many projects to reproduce this.

  8. added a commit that references this issue on Mar 10, 2026
  9. martinlippert commented on Mar 10, 2026

    @martinlippert
    MemberAuthor
  10. added a commit that references this issue on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

for: vscodetheme: structural viewtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions