microsoft / microsoft/vscode-cpptools

Musl performance issues (Linux)

Open
#13,814 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Language Service performance
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.