Multiple language server processes increase memory footprint
Describe the bug
The extension spawns 2 copilot-language-server-arm64 processes per project, each consuming about 1GB of memory. This increases memory pressure and leads to poor performance. Xcode's own high memory consumption doesn't make things better. The fact that VS Code doesn't have this issue suggests that this is something that should be addressed.
Versions
- Copilot for Xcode: 0.46.0
- Xcode: 26.1.1
- macOS: 15.6.1
Hardware
- Apple M1 Pro 32 GB
Steps to reproduce
- Open an Xcode project
- Observe 2 copilot-language-server-arm64 processes spawning instantly
- Open another project
- Observe another 2 copilot-language-server-arm64 instances spawning
- Close all the projects
- Observe the copilot-language-server-arm64 processes remaining in memory
Screenshots
The Memory column you showed is not the real physical memory consumption. Can you show the real mem column as well?
Here is what I see on my macOS, the real mem is just 36 MB.
@testforstephen Doesn't look much better for me.
@tarbayev thanks for the information. May I ask whether the memory consumption is sustained over time or just a peak value?
@testforstephen It's like this straight after opening a project. Good thing it doesn't grow over time.
The same problem persists; each language process is consuming approximately 1GB of memory, causing severe lag when editing code in Xcode.
What are these processes used for? Could their number be reduced?