Large projects using ninja have a problem: the minimum time required to do anything with ninja is bound by the time to parse build files, which can be in the 5-6 second range for several projects I know of.
There have been a
couple attempts to address this with a persistent build server mode which forks into the background and holds the dependency tree in memory. As far as I'm aware there were no design concerns around the second of these, and I've now begun
resurrecting that PR with the added ability to handle arbitrary build and tool requests from one server.
On a (minimal) Fuchsia build, this takes full noop build times from 6s to 1s. If you select a specific target (ergo don't have to stat every input file in the build), that goes down to 200ms. Tools that query the build graph have no latency.
Even if build file parsing was sped up by a factor of two, it would not come close to this. As many developers on large projects will tell you, waiting an extra 5 seconds for every build can be painful for staying in development flow and getting quick feedback.
It seems like a lot of projects using ninja stand to benefit from this, so I'm starting this thread to gauge interest and ideally get it on a future release milestone.