Skip to content

perf: optimize workspace dependencies for faster builds#542

Merged
echobt merged 1 commit intomasterfrom
perf/optimize-workspace-dependencies
Feb 1, 2026
Merged

perf: optimize workspace dependencies for faster builds#542
echobt merged 1 commit intomasterfrom
perf/optimize-workspace-dependencies

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Feb 1, 2026

Summary

This PR optimizes the workspace dependencies to significantly reduce build times and dependency footprint.

Changes

  • Remove 100+ unused dependencies identified by cargo-machete
  • Upgrade cortex-app-server from axum 0.7 to 0.8 (workspace version)
  • Upgrade cortex-lsp to use workspace dependencies (reqwest, tokio, serde, etc.)
  • Consolidate tokio versions across feature crates to use workspace reference
  • Reduce Cargo.lock by ~1400 lines

Metrics

Metric Before After Improvement
Dependency tree lines 3958 3257 ~18% reduction
Duplicate packages 180+ ~160 Significant reduction

Affected Crates (54 files)

  • Core: cortex-cli, cortex-engine, cortex-app-server
  • Utils: cortex-utils-git, cortex-utils-string, cortex-utils-pty, cortex-utils-cache, cortex-utils-image
  • Features: cortex-plugins, cortex-otel, cortex-sandbox, cortex-execpolicy, cortex-lsp, and more
  • GUI: cortex-gui, cortex-desktop-cli
  • OpenTUI: opentui-terminal, opentui-buffer, opentui-layout, opentui-syntax

Testing

  • Workspace compiles successfully (excluding GUI crates which require frontend build)
  • No new errors introduced

- Remove 100+ unused dependencies identified by cargo-machete
- Upgrade cortex-app-server from axum 0.7 to 0.8 (workspace version)
- Upgrade cortex-lsp to use workspace dependencies (reqwest, tokio, serde, etc.)
- Consolidate tokio versions across feature crates to use workspace reference
- Reduce Cargo.lock by ~1400 lines

Dependency metrics:
- Before: 3958 dependency tree lines
- After: 3257 dependency tree lines (~18% reduction)
- Duplicate packages reduced from 180+ to ~160

Affected crates (54 files changed):
- Core: cortex-cli, cortex-engine, cortex-app-server
- Utils: cortex-utils-git, cortex-utils-string, cortex-utils-pty, cortex-utils-cache, cortex-utils-image
- Features: cortex-plugins, cortex-otel, cortex-sandbox, cortex-execpolicy, cortex-lsp, cortex-core, cortex-commands, cortex-login, cortex-common, cortex-skills, cortex-feedback, cortex-tui, cortex-ghost, cortex-compact, cortex-batch, cortex-review, cortex-resume, cortex-share, cortex-ratelimits, cortex-experimental, cortex-migrations, cortex-linux-sandbox, cortex-windows-sandbox, cortex-shell-snapshot, cortex-exec, cortex-collab, cortex-network-proxy, cortex-mcp-server, cortex-prompt-harness, cortex-protocol, cortex-update, cortex-slack, cortex-tui-capture, cortex-tui-components
- GUI: cortex-gui, cortex-desktop-cli
- OpenTUI: opentui-terminal, opentui-buffer, opentui-layout, opentui-syntax
@echobt echobt merged commit dc3e6a2 into master Feb 1, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant