git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: GIT Mailing-list <git@vger.kernel.org>,
	Pratyush Yadav <me@yadavpratyush.com>,
	Adam Dinwoodie <adam@dinwoodie.org>
Subject: Re: [RFC PATCH 0/8] speed up 'make clean'
Date: Fri, 6 Nov 2020 01:26:49 +0000	[thread overview]
Message-ID: <f107d6be-0924-88b0-bd34-582b1eed172b@ramsayjones.plus.com> (raw)
In-Reply-To: <xmqq361niifm.fsf@gitster.c.googlers.com>



On 05/11/2020 21:48, Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
>> [Yes, 'cd Documentation; make clean all' will be slower that a doing
>> separate 'make clean; make', but the extra 10s, or so, will be swamped
>> by the documentation build time! ;-) ]
> 
> Hmph, the "all" part in "make clean all" needs the information we
> read from these generated files, and time must be spent to generate
> them whether "make clean all" or "make clean; make all" is used.  In
> the latter, we may not generate and read them in the first phase,
> but the second one "make all" would need to do so anyway.  So I am
> puzzled why "make clean all" needs to be slower---don't we generate
> and read them only once in either case?
> 

Hmm, interesting. I was all ready to explain the results of the
moc-up of this that I did about a month ago, but thought I should
just check again ... ;-)

This time I used the actual Makefile, rather than a moc-up, and got
different (in some sense, worse) results. What I was going to say
was, no the doc.dep file gets generated twice - but that is not true. :(

However, if you run 'make clean all', you will not be pleased with
the results!

  $ make clean
  ...
  $ make clean all >zzz 2>&1
  $ grep WARNING zzz | wc -l
  26
  $ tail -1 zzz
  make: *** [Makefile:362: git.1] Error 13
  $ 

If you look at the output, you will see that, while processing the
'clean' target, the 'doc.dep' file is created, -included, and then
immediately deleted. While processing the 'all' target I had expected
the 'doc.dep' file to be recreated - but it isn't. It seems to have
done the 'drop the internal data, re-read and re-parse' only the
once, and on the second go round (because it has already generated
it once) does not re-create and re-read the dependency data again.
Thus, the 'all' target is executed without any 'doc.dep' data and
falls over in a heap. :(

[BTW, just doing 'make' does not do a full build. I will look at why
that is later].

Doing 'make clean; make all' works fine, of course.

That will teach me to cut corners! Ho-Hum. Sorry about that.

Thanks.

ATB,
Ramsay Jones

      reply	other threads:[~2020-11-06  1:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 21:01 [RFC PATCH 0/8] speed up 'make clean' Ramsay Jones
2020-11-05 21:48 ` Junio C Hamano
2020-11-06  1:26   ` Ramsay Jones [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=f107d6be-0924-88b0-bd34-582b1eed172b@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@yadavpratyush.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).