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
[structure view] initial delay when opening the view #1690
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.
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.
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.
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.
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.
Activity
BoykoAlex commentedon Feb 20, 2026
@martinlippert is this when the view is opened initially? Or when the view is opened after the extension and boot ls is started?
martinlippert commentedon Feb 20, 2026
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.
martinlippert commentedon Mar 9, 2026
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.
martinlippert commentedon Mar 9, 2026
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.
martinlippert commentedon Mar 9, 2026
Next insights:
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:
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.
GH-1690: compute logical structure for multiple projects in parallel
martinlippert commentedon Mar 10, 2026
created branch https://github.com/spring-projects/spring-tools/tree/gh-1690 for work on this topic
GH-1690: compute logical structure for multiple projects in parallel