Skip to content

Borrow normalized paths during file URL conversion - #22559

Merged
astral-automations-bot[bot] merged 1 commit into
mainfrom
zb/opportunity-07-09-borrow-url-paths
Oct 14, 2026
Merged

astral-automations-bot[bot] merged 1 commit into
mainfrom
zb/opportunity-07-09-borrow-url-paths

Conversation

@astral-automations-bot

Copy link
Copy Markdown
Contributor

VerbatimUrl path constructors already own the normalized path but clone it before passing it to DisplaySafeUrl::from_file_path, which only needs a borrowed path. Borrow it for conversion and move it into the conversion error when needed, avoiding those temporary path copies.

@astral-automations-bot astral-automations-bot Bot added internal A refactor or improvement that is not user-facing performance labels Oct 14, 2026
@astral-automations-bot
astral-automations-bot Bot enabled auto-merge (squash) October 14, 2026 17:46
@astral-automations-bot
astral-automations-bot Bot merged commit 1d2e9df into main Oct 14, 2026
62 of 63 checks passed
@astral-automations-bot
astral-automations-bot Bot deleted the zb/opportunity-07-09-borrow-url-paths branch October 14, 2026 17:53
lcheylus pushed a commit to lcheylus/uv that referenced this pull request Oct 14, 2026
`VerbatimUrl` path constructors already own the normalized path but
clone it before passing it to `DisplaySafeUrl::from_file_path`, which
only needs a borrowed path. Borrow it for conversion and move it into
the conversion error when needed, avoiding those temporary path copies.

Co-authored-by: zaniebot <[email protected]>
@codspeed

codspeed Bot commented Oct 14, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
❌ 1 regressed benchmark
✅ 40 untouched benchmarks
⏩ 80 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ ⚠️ discover_workspace_from_all_members_with_excludes 148.2 ms 164.2 ms -9.72%
⚡ from_hex/uppercase[48] 336.9 µs 315.9 µs +6.64%
⚡ ⚠️ discover_workspace_from_all_members 148.8 ms 140.6 ms +5.89%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing zb/opportunity-07-09-borrow-url-paths (b6e3aa7) with main (1310268)2

Open in CodSpeed

Footnotes

  1. 80 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (725b74b) during the generation of this report, so 1310268 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

This branch was previously deployed

1 inactive deployment
automations — b6e3aa79 Deployed Oct 14, 2026 by astral-automations-bot[bot] via review / security review #50979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants