microsoft / microsoft/copilot-for-eclipse

[Bug] Defer and coalesce customization discovery during Copilot startup

Open
#433 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
126
Forks
60
Avg merge
2d 6h
Merged PRs (30d)
5

Description

Environment

  • OS: RHEL 9.6
  • Eclipse Version: 4.38 and 4.41 nightly
  • Plugin Version: 0.21.0

Describe the bug

During startup, ChatServiceManager schedules several language-server operations concurrently:

  • Model loading
  • Conversation-template loading
  • Custom skill discovery
  • Custom prompt discovery
  • Custom instruction discovery
  • Custom agent discovery

CustomizationFileService.refreshAllAsync() sends one request per customization type and passes every top-level Eclipse project as a workspace folder.

For large workspaces, CLS can spend minutes recursively discovering and watching customization files. Because other requests share the same CLS process, model loading and Chat remain unavailable until discovery completes.

Related issues:

  • #408
  • microsoft/copilot-language-server-internal#1802

To Reproduce

Steps to reproduce the behavior:

  1. Open an Eclipse workspace containing a very large project tree.
  2. Start Eclipse with Copilot 0.21.0.
  3. Open Copilot Chat or the Models preference page.
  4. Observe that Models remains in the loading state and Chat does not respond.
  5. Observe high CPU usage in the copilot-language-server process.
  6. Wait for customization discovery to complete; Models and Chat then become responsive.

Expected behavior

Copilot Chat and model selection should become usable without waiting for workspace-wide customization discovery.

Screenshots

Logs and recordings are available in #408.

Additional context

Suggested plugin-side mitigation:

  • Do not eagerly request every customization type during plugin activation.
  • Maintain at most one in-flight refresh per workspace.
  • Avoid duplicate refreshes caused by authentication, feature-flag, and customization events.
  • Load customization data lazily when the corresponding feature is used.
  • Scope discovery to relevant projects where possible.
  • Do not send concurrent workspace-wide discovery requests while critical startup requests are pending.

Serializing the existing unbounded scans is not sufficient by itself, because a single scan can still block CLS for several minutes.

Acceptance criteria:

  • Models and Chat are usable while customization discovery is pending.
  • Startup does not issue duplicate or concurrent workspace-wide discovery requests.
  • Customizations are eventually discovered and refreshed correctly.
  • Existing multi-project behavior is preserved.

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.

Research direction

Start at ChatServiceManager startup and CustomizationFileService.refreshAllAsync(); trace the authentication, feature-flag, and customization event paths that trigger refreshes. Reproduce with a large Eclipse workspace and verify that Models and Chat become usable while discovery is pending, with no duplicate or concurrent workspace-wide requests and eventual multi-project refreshes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.