redhat-developer / redhat-developer/vscode-java

Slow workspace initialization and reference search in large Gradle monorep

Open
#3,904 16 comments 2 reactions 1 assignee View on GitHub

@snjeza is already working on this.

Since Dec 29, 2024.

regression
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Description

Each time I start VSCode, the Java Language Server re-initializes the workspace which takes a considerable amount of time. During this initialization period, I cannot:

  • Navigate to object references
  • See method callers/usages
  • Use other indexing-dependent features

Even after indexing is complete, searching for references takes several seconds to display results, which is significantly slower compared to IntelliJ.

Project Structure
  • Type: Monorepo with root project and multiple modules
  • Build Tool: Gradle
Current Setup
  • Extensions installed:
    • Gradle for Java
    • Java Language Server
What I've tried
  • Setting "java.import.gradle.enabled": false - This didn't help as it prevented project importing altogether, making indexing features unavailable
  • Default settings with "java.import.gradle.enabled": true - Works but very slow initialization
Expected Behavior
  • Faster workspace initialization on startup
  • Quick reference search response (similar to IntelliJ performance)
  • Persistence of indexing between editor sessions
Actual Behavior
  1. Every editor restart triggers full workspace reinitialization
  2. Reference search takes several seconds to display results
  3. Unable to use navigation features during initialization
Environment
  • OS: macOS Ventura 13.1
  • Java Language Server Extension Version: 1.38.0
  • Gradle for Java Extension Version: 3.16.4
  • VSCoder Version: 1.93.1
  • JDK Version: Amazon Coretto 1.8
Additional Context

This is affecting development productivity significantly, especially when working with large codebases that require frequent navigation between references and implementations.

Question

Is there a way to:

  1. Persist the indexing between editor sessions?
  2. Optimize the reference search performance?
  3. Configure selective indexing for specific modules while maintaining full functionality?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.