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

Tips for performance when opening big projects like Keycloak? #2537

Open
tsaarni opened this issue Jul 2, 2022 · 1 comment
Open

Tips for performance when opening big projects like Keycloak? #2537

tsaarni opened this issue Jul 2, 2022 · 1 comment

Comments

@tsaarni
Copy link

tsaarni commented Jul 2, 2022

I'm working with Keycloak, which is a big code base.

Opening the project is quite frustrating: it takes 5+ minutes for the things to settle down. It seems that just closing and reopening vscode with the project open will take very long as well, at least if there are any changed files (like after small git pull).

I wonder if too much of the code base is compiled since the compilation also shows errors for modules that are not shown when compiling with maven on command line (which takes 2 minutes btw). Maybe the active maven profile is not obeyed? Keycloak code base might have some maven modules that are not maintained anymore and it would be desirable to include only the relevant ones.

I would appreciate any pointers on how to troubleshoot and optimize the performance of opening a big project such as Keycloak.

Thank you!

Environment
  • Operating System: Ubuntu 20.04.4 LTS
  • JDK version: OpenJDK Temurin-11.0.15+10
  • Visual Studio Code version: 1.68.1 (x86)
  • Java extension version: [email protected]
Steps To Reproduce
  1. git clone https://github.com/keycloak/keycloak
  2. open the project
Current Result
Expected Result
Additional Informations
@snjeza
Copy link
Contributor

snjeza commented Jul 2, 2022

@tsaarni the keycloak project includes 240 maven projects. You can try to include only required projects.
For instance, you can add the following property:

 "java.import.exclusions": [
        "**/node_modules/**",
        "**/.metadata/**",
        "**/archetype-resources/**",
        "**/META-INF/maven/**",
        "**/keycloak/**",
        "**/keycloak",
        "!**/keycloak/core",
        "!**/keycloak/common",
        "!**/keycloak/boms",
        "!**/keycloak/boms/**",
    ],

and Clean the workspace directory
It will include only the projects from the core, common and boms directories.

A related issue - #1084

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

No branches or pull requests

4 participants