I keep seeing people talking about moving towards single-header includes with GTK+. I’m not sure why this is suddenly a big deal without much discussion about whether it’s actually a good thing, but I do want to bring up one concern.

<gtk.h> includes a heck of a lot of other files.

Here’s a test, building the VMware Workstation UI with and without single-header includes (on my 8-core beast):

Status quo:
real    4m34.861s
user    17m46.059s
sys     1m44.091s

Single-header include:
real    5m16.210s
user    19m56.175s
sys     1m55.627s

The actual percentage time per file is quite a bit higher than this shows; I’m estimating that at least 60% of the “real” time is spent doing mtime checks and dependency analysis in our build system.

Perhaps there’s a good reason for single-header includes, and it just hasn’t been communicated. Meanwhile, this does have a noticible impact for developers on large codebases.

On the other hand, maybe we can precompile gtk.h and everything that comes from that?