Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ GitHub Releases publish these archive families:
| Windows x86_64 | `x86_64-pc-windows-msvc` | `.zip` |
| Windows ARM64 | `aarch64-pc-windows-msvc` | `.zip` |

The Linux archives are static musl builds that allocate through mimalloc; the
macOS and Windows archives use the platform allocator.

Each release also includes `SHA256SUMS`. GitHub CLI users can additionally verify
an archive's build provenance:

Expand Down
5 changes: 5 additions & 0 deletions crates/codegraph-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true }
time = { workspace = true }

# musl's allocator serializes threads; the static Linux release builds use
# mimalloc instead. Other targets keep their system allocator.
[target.'cfg(target_env = "musl")'.dependencies]
mimalloc = { version = "0.1.52", default-features = false, features = ["v2"] }

[dev-dependencies]
rusqlite = { workspace = true }
codegraph-bench = { path = "../codegraph-bench" }
Expand Down
7 changes: 7 additions & 0 deletions crates/codegraph-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ mod installer;
mod structural_gate;
mod viewer_gate;

/// musl's allocator serializes threads, so the static Linux release builds got
/// slower as threads were added: a full index of this repository took over two
/// minutes at 32 threads, against 51 s at one. Through mimalloc it takes 8 s.
Comment on lines +46 to +47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove unreproducible benchmark timings

These hard-coded timings publish a performance claim without an in-repository record of the commit, corpus, environment, exact command, run count, and dispersion, so the numbers will become misleading as the repository and hardware change. Keep the allocator rationale here and move the measurements to reproducible benchmark evidence.

AGENTS.md reference: AGENTS.md:L141-L142

Useful? React with 👍 / 👎.

#[cfg(target_env = "musl")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

/// Test-only: the ONE process-wide environment lock for this binary.
///
/// `cargo test` runs every unit test of this binary on threads of a SINGLE
Expand Down
2 changes: 2 additions & 0 deletions docs/readme/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ GitHub Releases 发布以下归档系列:
| Windows x86_64 | `x86_64-pc-windows-msvc` | `.zip` |
| Windows ARM64 | `aarch64-pc-windows-msvc` | `.zip` |

Linux 归档是静态链接的 musl 构建,内存分配走 mimalloc;macOS 与 Windows 归档使用系统分配器。

每个 Release 还包含 `SHA256SUMS`。GitHub CLI 用户可进一步验证归档构建来源:

```bash
Expand Down
Loading