Is Ninja really needed on Windows?

2,037 views
Skip to first unread message

Nicolas Desprès

unread,
Dec 29, 2011, 12:50:12 PM12/29/11
to ninja-build
Hello everybody,

Just a thought I had when reading some Windows related thread in this
discussion group.

Is Ninja really needed on Windows?

Ninja's first goal is to have a very short start-up time even with
large project contrary to make. Correct me if I am wrong, but most of
Windows developers use Visual Studio and its build system built into
the IDE. Since the IDE tracks every files it always now which one
need to be rebuilt. So I guess that the IDE start-up time is pretty
fast. If yes do Windows developers really need Ninja? Does Ninja give
any real benefit to Windows developers in term of development life
cycle?

Regards,

--
Nicolas Desprès

okuoku

unread,
Dec 29, 2011, 2:16:46 PM12/29/11
to ninja...@googlegroups.com
Hi,

2011/12/30 Nicolas Desprès <nicolas...@gmail.com>:


> Hello everybody,
>
> Just a thought I had when reading some Windows related thread in this
> discussion group.
>
> Is Ninja really needed on Windows?

It's just my personal, unauthorized view, but I think Ninja's Windows
support is useful because:

a) ".ninja" format were _really_ useful even for Windows

I'm using ".ninja" format as a "universal build rule interchange format".

I wrote Ninja compatible build system using clang 2.9 compiler driver
(I had scrapped it though; i have to move to clang3) and its
file-system monitoring were reduced project turn-around time.
Process launching is extremely slow on Windows and i wanted to make
compiler process resident...

Our Linux developers are happy with original Ninja, of course. We
could share our custom project generator between platform.

b) ninja.exe might be useful for project generator(like CMake) development

Use of MSBuild (the build engine of MSVC) on cross-platform project is
a bit problematic.
(e.g. You have to use .net classes to extend MSBuild's own task and it
is just too slow.)

But choice for make-compatible buildsystem is quite narrow on Windows.
Among Win32 native implementation, only Qt's jom(
http://qt.gitorious.org/qt-labs/jom ) has parallel building AFAIK.

Once CMake had supported Win32 .ninja project generation, I guess many
people would switch to ninja.exe over make-compatibles.
(But it is just the Chicken or the Egg dilemma!)

> So I guess that the IDE start-up time is pretty
> fast.

No. It's slow like Eclipse IDE...

-- oku

Nicolas Desprès

unread,
Dec 30, 2011, 8:06:38 AM12/30/11
to ninja...@googlegroups.com

Yep that's the major improvement compared to nmake which does not
support parallel build.

> Once CMake had supported Win32 .ninja project generation, I guess many
> people would switch to ninja.exe over make-compatibles.
> (But it is just the Chicken or the Egg dilemma!)

Sure, but there is already jom and nmake for implementing nightbuild
and stuff like that. In this case you don't need really need a very
short start-up time.

>
>> So I guess that the IDE start-up time is pretty
>> fast.
>
> No. It's slow like Eclipse IDE...

Sorry for being unclear, but I did not mean the start-up time of the
IDE but the start-up time when you click the "run" button in the IDE.

Cheers,

--
Nicolas Desprès

okuoku

unread,
Dec 30, 2011, 8:49:28 AM12/30/11
to ninja...@googlegroups.com
2011/12/30 Nicolas Desprès <nicolas...@gmail.com>:

> On Thu, Dec 29, 2011 at 8:16 PM, okuoku <oku...@gmail.com> wrote:
- snip -

>>> So I guess that the IDE start-up time is pretty
>>> fast.
>>
>> No. It's slow like Eclipse IDE...
>
> Sorry for being unclear, but I did not mean the start-up time of the
> IDE but the start-up time when you click the "run" button in the IDE.

VisualStudio IDE is not designed for "generated" project file. We have
to reload project once it had regenerated so we cannot keep IDE
running when we were adding sources to the project, for example.
CMake handles this automatically with VisualStudio macro feature but
it won't work reliably.

... and we cannot use alternative compilers like gcc(MinGW) or Clang
with VisualStudio or MSBuild. There are several attempts (e.g.
https://github.com/ishani/ClangVSx ) though.


With regard to start-up time, I feel Ninja might not be required to
spend too much attention on Win32. Unfortunately, NTFS was not
designed for software development, really :P

-- oku

Philip Craig

unread,
Jan 4, 2012, 4:51:37 AM1/4/12
to ninja...@googlegroups.com
Yes, ninja is useful on Windows. The VS IDE has plenty of limitations -- it is not a replacement for make or jom, in those cases where make or jom are useful.

It is not a replacement for the IDE either. It is a replacement for the build system though.

As for "too much attention on Win32" what is your concern here? Is it costing you something, and can that concern be addressed?

Nicolas Desprès

unread,
Jan 4, 2012, 5:58:48 AM1/4/12
to ninja...@googlegroups.com

It does not cost me anything and my purpose was not to offense anybody
working on the Windows port. So I apologies in advance if my question
was inappropriate. Actually, I also provided some patches for mingw
and I am willing to see Ninja ported on Windows. I was just curious
about the main use cases and wanted to know on which area to focus in
priority. My main concern is whether Ninja can improve the
development cycle of people using VS IDE.

Regards,

--
Nicolas Desprès

Reply all
Reply to author
Forward
0 new messages