Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Improve vendored filesystem concurrency#26408

Merged
charliermarsh merged 3 commits into
mainfrom
micha/vendored-filesystem-concurrency
Jun 26, 2026
Merged

[ty] Improve vendored filesystem concurrency#26408
charliermarsh merged 3 commits into
mainfrom
micha/vendored-filesystem-concurrency

Conversation

@MichaReiser

@MichaReiser MichaReiser commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Remove the shared mutex that serialized access to the vendored filesystem. Vendored files now use independent readers backed by shared archive bytes and metadata, allowing concurrent decompression without copying the archive.

This is possible because cloning a ZipArchive can be cheap, when the underlying data is cheap clonable, which is the case for ty. The data is cheap clonable because one is a &'static [u8] and the other variant is an Arc<[u8]>, both have O(1) clone.

Performance

A 1% improvement on most project benchmarks. Might be more on runners that support higher concurrency

Test Plan

Testing: Added concurrent read coverage and ran crate tests, Clippy, repository hooks, and a ty build.

@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 94.47%. The percentage of expected errors that received a diagnostic held steady at 89.19%. The number of fully passing files held steady at 95/134.

@MichaReiser MichaReiser added performance Potential performance improvement ty Multi-file analysis & type inference labels Jun 26, 2026
@MichaReiser MichaReiser marked this pull request as ready for review June 26, 2026 14:05
@MichaReiser MichaReiser requested review from a team as code owners June 26, 2026 14:05
@astral-sh-bot astral-sh-bot Bot requested a review from carljm June 26, 2026 14:05
@charliermarsh charliermarsh merged commit 239429e into main Jun 26, 2026
63 checks passed
@charliermarsh charliermarsh deleted the micha/vendored-filesystem-concurrency branch June 26, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Potential performance improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants