All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/4] doc build: speed up "make lint-docs"
Date: Fri, 15 Oct 2021 10:21:11 -0700	[thread overview]
Message-ID: <xmqqk0ie6w6w.fsf@gitster.g> (raw)
In-Reply-To: <patch-3.4-a02a668ebb3-20211015T123619Z-avarab@gmail.com> ("Ævar	Arnfjörð Bjarmason"'s message of "Fri, 15 Oct 2021 14:39:13 +0200")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Extend the trick we use to speed up the "clean" target to also extend
> to the "lint-docs" target. See 54df87555b1 (Documentation/Makefile:
> conditionally include doc.dep, 2020-12-08) for the "clean"
> implementation.
>
> The "doc-lint" target only depends on *.txt files, so we don't need to
> generate GIT-VERSION-FILE etc. if that's all we're doing. This makes
> the "make lint-docs" target more than 2x as fast:

Nice. 0.2s down to 0.1 is a 2x speedup.

> $ git show HEAD~:Documentation/Makefile >Makefile.old
> $ hyperfine -L f ",.old" 'make -f Makefile{f} lint-docs'
> Benchmark #1: make -f Makefile lint-docs
>   Time (mean ± σ):     100.2 ms ±   1.3 ms    [User: 93.7 ms, System: 6.7 ms]
>   Range (min … max):    98.4 ms … 103.1 ms    29 runs
>
> Benchmark #2: make -f Makefile.old lint-docs
>   Time (mean ± σ):     220.0 ms ±  20.0 ms    [User: 206.0 ms, System: 18.0 ms]
>   Range (min … max):   206.6 ms … 267.5 ms    11 runs
>
> Summary
>   'make -f Makefile lint-docs' ran
>     2.19 ± 0.20 times faster than 'make -f Makefile.old lint-docs'
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Documentation/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 78324934d9f..e8e54e053a6 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -284,7 +284,7 @@ install-html: html
>  ../GIT-VERSION-FILE: FORCE
>  	$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
>  
> -ifneq ($(MAKECMDGOALS),clean)
> +ifneq ($(filter-out lint-docs clean,$(MAKECMDGOALS)),)
>  -include ../GIT-VERSION-FILE
>  endif

  reply	other threads:[~2021-10-15 17:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 12:39 [PATCH 0/4] doc lint: fix recent regression, make non-.PHONY Ævar Arnfjörð Bjarmason
2021-10-15 12:39 ` [PATCH 1/4] doc lint: fix error-hiding regression Ævar Arnfjörð Bjarmason
2021-10-15 12:39 ` [PATCH 2/4] doc lint: emit errors on STDERR Ævar Arnfjörð Bjarmason
2021-10-15 12:39 ` [PATCH 3/4] doc build: speed up "make lint-docs" Ævar Arnfjörð Bjarmason
2021-10-15 17:21   ` Junio C Hamano [this message]
2021-10-15 12:39 ` [PATCH 4/4] doc lint: make "lint-docs" non-.PHONY Ævar Arnfjörð Bjarmason
2021-10-16  1:57   ` Bagas Sanjaya
2021-10-16  5:13     ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqk0ie6w6w.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.