mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-10 22:39:32 +00:00
I've noticed `WorkspaceCommandHelper::format_file_path()` appear in profiles a few times. A big part of that is spent in `RepoPath::to_fs_path()`. I think I had been thinking that `PathBuf::join()` takes `self` by value and mutates it, but it turns out it creates a new instance. So our `result = result.join(...)` in a loop was copying the `PathBuf` over and over. This fixes that and also reserves the expected size. That speeds up `jj files --ignore-working-copy -r v6.0` in the Linux repo from 546.0 s to 509.3 s (6.7%). |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
Cargo.toml |