microsoft / microsoft/copilot-for-eclipse
[Bug] Defer and coalesce customization discovery during Copilot startup
Nobody has claimed this yet.
- 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:
- Open an Eclipse workspace containing a very large project tree.
- Start Eclipse with Copilot 0.21.0.
- Open Copilot Chat or the Models preference page.
- Observe that Models remains in the loading state and Chat does not respond.
- Observe high CPU usage in the
copilot-language-serverprocess. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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