git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] Makefile: conditionally include GIT-VERSION-FILE
Date: Fri, 18 Dec 2020 00:44:47 +0530	[thread overview]
Message-ID: <20201217191447.xrijupbmqulnp3ym@yadavpratyush.com> (raw)
In-Reply-To: <ceacd2f6-c9c7-ef93-8bc2-0749770a260f@ramsayjones.plus.com>

On 07/12/20 12:39AM, Ramsay Jones wrote:
> 
> The 'clean' target is noticeably slow on cygwin, even for a 'do-nothing'
> invocation of 'make clean'. For example, the second 'make clean' given
> below:
> 
>   $ make clean >/dev/null 2>&1
>   $ make clean
>   GITGUI_VERSION = 0.21.0.85.g3e5c
>   rm -rf git-gui lib/tclIndex po/*.msg
>   rm -rf GIT-VERSION-FILE GIT-GUI-VARS
>   $
> 
> has been timed at 1.934s on my laptop (an old core i5-4200M @ 2.50GHz,
> 8GB RAM, 1TB HDD).
> 
> Notice that the Makefile, as part of processing the 'clean' target, is
> updating the 'GIT-VERSION-FILE' file.  This is to ensure that the
> $(GITGUI_VERSION) make variable is set, once that file had been included.
> However, the 'clean' target does not use the $(GITGUI_VERSION) variable,
> so this is wasted effort.
> 
> In order to eliminate such wasted effort, use the value of the internal
> $(MAKECMDGOALS) variable to only '-include GIT-VERSION-FILE' when the
> target is not 'clean'. (This drops the time down to 0.676s, on my laptop,
> giving an improvement of 65.05%).
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---

Applied to git-gui/master. Thanks.

-- 
Regards,
Pratyush Yadav

      reply	other threads:[~2020-12-17 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  0:39 [PATCH] Makefile: conditionally include GIT-VERSION-FILE Ramsay Jones
2020-12-17 19:14 ` Pratyush Yadav [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20201217191447.xrijupbmqulnp3ym@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).