microsoft / microsoft/vscode-cpptools
Musl performance issues (Linux)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Currently, the C/C++ Extension ships binaries for Linux that were built with musl and statically linked. This allows more systems to be supported, due to issues with glibc verions and backwards compatibility with (not that much) older glibc systems. Unfortunately, glibc cannot be properly statically linked to avoid those issues.
https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged
Unfortunately, musl has performance issues:
https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance/
Opening this issue to potentially work around performance issues by perhaps either:
- Shipping both musl and non-musl native binaries and launching the musl binaries only on systems we determine incompatible with our glibc binaries. (This may involve needing to adapt crash stack reporting to also work with glibc).
- Or, switching to an alternative allocator in musl builds.
(The VS Code marketplace supports musl distros, so we would continue to build and ship the musl versions.)
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 with the issue description and its linked discussions about static glibc linking and musl allocator performance. Compare the two proposed approaches, including musl and glibc binary handling and crash stack reporting; done means a selected approach is implemented while retaining musl marketplace support and addressing the reported performance concern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, linux
- Domain
- build-system, operating-systems, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100