From 047902f3d04b4159b62376b4c80f92f2e5325580 Mon Sep 17 00:00:00 2001 From: casswedson <58050969+casswedson@users.noreply.github.com> Date: Sun, 11 Dec 2022 10:23:30 -0500 Subject: [PATCH] use parallel processes in ci specific astyle calls (#62680) usually half astyle's execution time for the astyle ci test and also the pr code reviewer total execution time is like 11 secs, still in the case of the code reviewer I'll take any time improvements use xargs' `-P` option ``` -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time ``` Co-authored-by: casswedson --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5625abf7b7f4e..db44d0fa0e5ea 100644 --- a/Makefile +++ b/Makefile @@ -1216,7 +1216,7 @@ $(ODIR)/.astyle-check-stamp: $(ASTYLE_SOURCES) endif astyle-fast: $(ASTYLE_SOURCES) - $(ASTYLE_BINARY) --options=.astylerc -n $(ASTYLE_SOURCES) + echo $(ASTYLE_SOURCES) | xargs -P 0 -L 1 $(ASTYLE_BINARY) --quiet --options=.astylerc -n astyle-diff: $(ASTYLE_SOURCES) $(ASTYLE_BINARY) --options=.astylerc -n $$(git diff --name-only src/*.h src/*.cpp tests/*.h tests/*.cpp)