Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Marie" <cedric.marie@openmailbox.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Add BR2_CMAKE_USE_NINJA_BACKEND option
Date: Wed, 01 Feb 2017 18:01:31 +0100	[thread overview]
Message-ID: <1422fd7b4aadc4c1efbec44cf687740c@openmailbox.org> (raw)
In-Reply-To: <20170130102316.2a02ed3a@free-electrons.com>

Hi,

Le 2017-01-30 10:23, Thomas Petazzoni a ?crit?:
> OK, understood. But do you have numbers showing that "make foo-rebuild"
> is actually faster with Ninja ?
> 
> In the tests done by Romain, it's only saving 1-2 seconds on the
> total build of a package. So I would suspect that the savings on a
> partial build are even smaller.
> 
> Even if your CMake packages are private, can you give us some numbers
> that show the time benefits of Ninja?

You're right, it is a private package, that's why I had to test on other 
packages I'm not particularly using, to demonstrate.

The benefit is rather small for my package too.

Make:
real	1m1.517s
user	2m23.996s
sys	0m36.197s

Ninja:
real	0m56.312s
user	2m19.078s
sys	0m29.119s

NB: It includes the whole "time make foo-rebuild" command, because time 
output is "strange" when inserted in pkg-cmake.mk (... time 
$$($$(PKG)_MAKE) ...), don't know why...
Looks like:
130.50user 19.88system 0:42.32elapsed 355%CPU (0avgtext+0avgdata 
24680maxresident)k
0inputs+50416outputs (0major+7602195minor)pagefaults 0swaps

To be honest, when I started to add ninja possibility, I expected much 
bigger savings :)
Yet I have the option, so even if the benefit is small, I keep using it.

But in the end, I don't know whether it's worth pushing upstream or 
not...

Besides Buildroot, I also switched another package from CMake/Make to 
Meson (based on Ninja), and the benefit was much more interesting - 
although I have not kept any measure to give here.
I expected the improvement to be caused by Ninja, not Meson. But it 
seems that Meson makes the difference, rather than Make vs Ninja.


-- 
C?dric

  reply	other threads:[~2017-02-01 17:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 22:37 [Buildroot] [PATCH 1/2] Add BR2_CMAKE_USE_NINJA_BACKEND option Cédric Marie
2017-01-06 22:37 ` [Buildroot] [PATCH 2/2] Update documentation of CMake infrastructure Cédric Marie
2017-01-25  3:27   ` Thomas Petazzoni
2017-01-21 22:25 ` [Buildroot] [PATCH 1/2] Add BR2_CMAKE_USE_NINJA_BACKEND option Romain Naour
2017-01-23 13:39   ` Cédric Marie
2017-01-24 21:48     ` Romain Naour
2017-01-25  1:27       ` Thomas Petazzoni
2017-01-26 17:27         ` Cédric Marie
2017-01-30  9:23           ` Thomas Petazzoni
2017-02-01 17:01             ` Cédric Marie [this message]
2017-02-01 20:12               ` Thomas Petazzoni
2017-02-03 10:44                 ` Cédric Marie
2017-01-25  1:37 ` Thomas Petazzoni
2017-07-11 11:56 ` Thomas Petazzoni
2017-07-11 13:25   ` Cédric Marie
2017-07-11 13:35     ` Thomas Petazzoni

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=1422fd7b4aadc4c1efbec44cf687740c@openmailbox.org \
    --to=cedric.marie@openmailbox.org \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox