3 ms·
> Just a question---do you have a project where reading the Makefile takes a non-negligible time? I have a project where reading the Makefile (and makefiles `i
by LukeShu 10y ago
> Just a question---do you have a project where reading the Makefile takes a non-negligible time?
I have a project where reading the Makefile (and makefiles `include`d by it) takes about 12 seconds. The little profiling that I've done leads me to believe that most of it is spent in the garbage collector. Regardless of whether that is true, for Makefiles that take a long time to "parse", the time isn't spent in parsing per se, it's spent managing the datastructures that parsing creates (or spent evaluating expensive things like $(shell) that because of lazy evaluation end up getting evaluated many times; but that's a smell of a poorly written Makefile).
> Um ... of course. The only way around this is for make to compile into some easier format to read or some database type thing (perhaps a .makefile?)
That is what ninja was designed for.