git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matt Rogers <mattr94@gmail.com>
To: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
Cc: Matthew Rogers via GitGitGadget <gitgitgadget@gmail.com>,
	Git List <git@vger.kernel.org>,
	Philip Oakley <philipoakley@iee.email>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Danh Doan <congdanhqx@gmail.com>
Subject: Re: [PATCH 2/3] cmake: create compile_commands.json by default
Date: Sat, 5 Jun 2021 18:36:05 -0400	[thread overview]
Message-ID: <CAOjrSZsyUi+RAqxXyd6JqzWqO8hMdtwTuWpZy+cKbz654Xu45A@mail.gmail.com> (raw)
In-Reply-To: <CAKiG+9W8Da4bG87VjTKN6m=cX+v_x33YAw8p4MqCfmNinYt1XA@mail.gmail.com>

On Fri, Jun 4, 2021 at 5:09 PM Sibi Siddharthan
<sibisiddharthan.github@gmail.com> wrote:
>
> On Fri, Jun 4, 2021 at 11:13 PM Matthew Rogers via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > A straightforward way to accomplish this is to make it as simple as
> > possible is to enable the generation of the compile_commands.json file,
> > which is supported by many tools such as: clang-tidy, clang-format,
> > sourcetrail, etc.
> >
> > This does come with a small run-time overhead during the configuration
> > step (~6 seconds on my machine):
> >
> >     Time to configure with CMAKE_EXPORT_COMPILE_COMMANDS=TRUE
> >
> >     real    1m9.840s
> >     user    0m0.031s
> >     sys     0m0.031s
> >
> >     Time to configure with CMAKE_EXPORT_COMPILE_COMMANDS=FALSE
> >
> >     real    1m3.195s
> >     user    0m0.015s
> >     sys     0m0.015s
> >
> > This seems like a small enough price to pay to make the project more
> > accessible to newer users.  Additionally there are other large projects
> > like llvm [2] which has had this enabled by default for >6 years at the
> > time of this writing, and no real negative consequences that I can find
> > with my search-skills.
> >
>
> The overhead is actually much smaller than that. In my system it is
> less than 150ms.

Is that 150 ms for the whole process or just the difference between the two
options?  I'm running this on windows via the git bash provided by the
git sdk.

> The first configure takes this long because we generate command-list.h
> and config-list.h.
> This process is really slow under Windows.
>

I used two different build directories for both my invocations specifically
to avoid having to account for cache variables and other side effects
from earlier configurations.  The variation could also be from network
latency since in this test I was downloading vcpkg, etc.

> Thank You,
> Sibi Siddharthan



-- 
Matthew Rogers

  reply	other threads:[~2021-06-05 22:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 17:43 [PATCH 0/3] Make CMake work out of the box Matthew Rogers via GitGitGadget
2021-06-04 17:43 ` [PATCH 1/3] cmake: add knob to disable vcpkg Matthew Rogers via GitGitGadget
2021-06-04 18:03   ` Eric Sunshine
2021-06-04 18:34     ` Matt Rogers
2021-06-04 20:55   ` Sibi Siddharthan
2021-06-05 22:30     ` Matt Rogers
2021-06-06  4:33       ` Sibi Siddharthan
2021-06-04 17:43 ` [PATCH 2/3] cmake: create compile_commands.json by default Matthew Rogers via GitGitGadget
2021-06-04 18:05   ` Eric Sunshine
2021-06-04 21:09   ` Sibi Siddharthan
2021-06-05 22:36     ` Matt Rogers [this message]
2021-06-06  4:39       ` Sibi Siddharthan
2021-06-04 17:43 ` [PATCH 3/3] cmake: add warning for ignored MSGFMT_EXE Matthew Rogers via GitGitGadget
2021-06-04 18:10   ` Eric Sunshine
2021-06-05  3:40 ` [PATCH 0/3] Make CMake work out of the box Bagas Sanjaya
2021-06-05 23:22   ` Matt Rogers
2021-06-10  9:43   ` Johannes Schindelin
2021-06-18 13:05     ` Philip Oakley
2021-06-18 13:42       ` Johannes Schindelin
2021-06-18 14:03         ` Philip Oakley
2021-06-22 22:32           ` Johannes Schindelin
2021-06-06 12:02 ` [PATCH v2 " Matthew Rogers via GitGitGadget
2021-06-06 12:02   ` [PATCH v2 1/3] cmake: add knob to disable vcpkg Matthew Rogers via GitGitGadget
2021-06-06 12:02   ` [PATCH v2 2/3] cmake: create compile_commands.json by default Matthew Rogers via GitGitGadget
2021-06-06 12:02   ` [PATCH v2 3/3] cmake: add warning for ignored MSGFMT_EXE Matthew Rogers via GitGitGadget
2021-06-07  0:54   ` [PATCH v2 0/3] Make CMake work out of the box Junio C Hamano
2021-06-10  9:45     ` Johannes Schindelin
2021-06-18 13:11       ` Philip Oakley
2021-06-18 13:09     ` Philip Oakley
2021-06-10  9:47   ` Johannes Schindelin
2021-06-11  6:22     ` Junio C Hamano

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=CAOjrSZsyUi+RAqxXyd6JqzWqO8hMdtwTuWpZy+cKbz654Xu45A@mail.gmail.com \
    --to=mattr94@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=philipoakley@iee.email \
    --cc=sibisiddharthan.github@gmail.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).