On 08/11/2014 02:55 PM, Rasmus Borup Hansen wrote: [lots of impressive analysis snipped]
> I hope this can help or at least be interesting for someone. Info like this is hard to come by and very important. I'll apply the attached in your name. (I'll add a link to the archives to the commit when it hits there) thanks! Pádraig.
>From 325ce996d136439249d8cb746bcc94f64ba3e6ef Mon Sep 17 00:00:00 2001 From: Rasmus Borup Hansen <[email protected]> Date: Mon, 11 Aug 2014 15:07:05 +0100 Subject: [PATCH] cp: remove redundant possibly expensive heap deallocation If the hash structures grow sufficiently large so that the system is actively swapping, then the deallocation can take a significant amount of time. * src/cp.c (main): Only call hash deallocation routines when in lint checking mode. * THANKS.in: Remove as now in the git author list. --- THANKS.in | 1 - src/cp.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/THANKS.in b/THANKS.in index 6fd79d3..af372a9 100644 --- a/THANKS.in +++ b/THANKS.in @@ -523,7 +523,6 @@ Raimonds Miltins [email protected] Rainer Orth [email protected] Ralf W. Stephan [email protected] Ralph Loader [email protected] -Rasmus Borup Hansen [email protected] Raul Miller [email protected] Raúl Núñez de Arenas Coronado [email protected] Rich Burridge [email protected] diff --git a/src/cp.c b/src/cp.c index 99cafa7..cda62af 100644 --- a/src/cp.c +++ b/src/cp.c @@ -1213,8 +1213,9 @@ main (int argc, char **argv) ok = do_copy (argc - optind, argv + optind, target_directory, no_target_directory, &x); - +#ifdef lint forget_all (); +#endif exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); } -- 1.7.7.6
