From: Stuart Henderson Subject: git parallel threads revisited To: Benoit Lecocq , Klemens Nanni Cc: ports , Claudio Jeker Date: Wed, 4 Jun 2025 12:52:51 +0100 claudio noticed that at least 'git checkout' still spawns a lot of threads; does this seem more reasonable? Index: Makefile =================================================================== RCS file: /cvs/ports/devel/git/Makefile,v diff -u -p -r1.287 Makefile --- Makefile 19 May 2025 14:23:44 -0000 1.287 +++ Makefile 4 Jun 2025 11:51:02 -0000 @@ -3,7 +3,7 @@ COMMENT-svn = subversion interoperabilit COMMENT-x11 = graphical tools V = 2.49.0 -REVISION = 1 +REVISION = 2 DISTNAME = git-${V} CATEGORIES = devel Index: patches/patch-preload-index_c =================================================================== RCS file: patches/patch-preload-index_c diff -N patches/patch-preload-index_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-preload-index_c 4 Jun 2025 11:51:02 -0000 @@ -0,0 +1,12 @@ +Index: preload-index.c +--- preload-index.c.orig ++++ preload-index.c +@@ -124,6 +124,8 @@ void preload_index(struct index_state *index, + trace2_region_enter("index", "preload", NULL); + + trace_performance_enter(); ++ if (threads > online_cpus()) ++ threads = online_cpus(); + if (threads > MAX_PARALLEL) + threads = MAX_PARALLEL; + offset = 0;