diff rust/rhg/src/commands/cat.rs @ 48224:6b5773f89183

rhg: faster hg cat when many files are requested With this patch I'm seeing a ~39ms improvement (220ms -> 181ms) when running [hg cat] on ~220 files in a ~260k-file repo. The timing for [hg cat] on an individual file becomes slightly worse (losing 5ms: 145ms -> 150ms). A follow-up commit is intended to improve that. Differential Revision: https://phab.mercurial-scm.org/D11615
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Mon, 04 Oct 2021 19:06:45 +0100
parents 08c8cd2527bc
children 027ebad952ac
line wrap: on
line diff
--- a/rust/rhg/src/commands/cat.rs	Fri Jul 16 18:42:20 2021 +0200
+++ b/rust/rhg/src/commands/cat.rs	Mon Oct 04 19:06:45 2021 +0100
@@ -73,7 +73,7 @@
         None => format!("{:x}", repo.dirstate_parents()?.p1),
     };
 
-    let output = cat(&repo, &rev, &files).map_err(|e| (e, rev.as_str()))?;
+    let output = cat(&repo, &rev, files).map_err(|e| (e, rev.as_str()))?;
     invocation.ui.write_stdout(&output.concatenated)?;
     if !output.missing.is_empty() {
         let short = format!("{:x}", output.node.short()).into_bytes();