jj/lib
Martin von Zweigbergk 86206e83a4 repo_path: avoid repeated copying of PathBuf in to_fs_path()
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%).
2023-09-09 08:43:29 -07:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos Use { workspace = true } to appease VS Code's Cargo.toml parser 2023-08-22 21:38:53 -07:00
src repo_path: avoid repeated copying of PathBuf in to_fs_path() 2023-09-09 08:43:29 -07:00
tests git: promote imported commits to tree-conflict format if configured 2023-09-08 21:54:43 +09:00
testutils tests: leverage create_tree() in a few more tests 2023-08-30 19:58:42 -07:00
Cargo.toml merged_tree: add diff iterator 2023-08-25 06:40:36 -07:00