Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup performance #854

Open
jameshearttech opened this issue Sep 1, 2024 · 5 comments
Open

Startup performance #854

jameshearttech opened this issue Sep 1, 2024 · 5 comments

Comments

@jameshearttech
Copy link

We have a large monorepo (50+ Maven projects). We want to use VS Code dev containers for local development, but it takes forever to start up (i.e., import projects, etc.).

For context, our laptops are running Windows 11 and we're using Podman Desktop with WSL as the container host. We are using volumes rather than the default bind mount, which has improved performance. We are building the images locally which also decreases the time it takes to create or rebuild a dev container.

On a fresh volume the initial import takes a very long time. Maybe 2 hours? Just a guess. Reloading the window or rebuilding the container also takes a long time. Maybe 30 minutes - 1 hour?

Is this expected? Is there anything we can do to improve performance?

@jdneo
Copy link
Member

jdneo commented Sep 2, 2024

Is it a single Maven project with 50+ sub-modules?

Do you need to open all those modules together, or you just need to use some of them for development?

@jameshearttech
Copy link
Author

Is it a single Maven project with 50+ sub-modules?

No submodules. Every project has it's own pom. It's roughly half services and half libraries.

Do you need to open all those modules together, or you just need to use some of them for development?

Ideally they are all opened together.

@jdneo
Copy link
Member

jdneo commented Sep 2, 2024

If all the projects are required to open in vscode. Maybe you can try to turn off the auto build. The side effect is that, if you turn off the auto build, you may not be able to find some errors at the first time. You need manually trigger build on demand.

The setting is java.autobuild.enabled

@jameshearttech
Copy link
Author

What about java.maxConcurrentBuilds? I see the default value is 1. I changed the value to 4. The change seems to have increased how quickly building occurs, but does it only apply to building (i.e., not importing, etc.). If so, is there any way to increase the number of concurrent imports and refreshes etc.?

@jdneo
Copy link
Member

jdneo commented Sep 5, 2024

java.maxConcurrentBuilds can boost the build time.

Meanwhile, you can increase the JVM memory via the setting java.jdt.ls.vmargs, which should help with the perf as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants