I keep see­ing peo­ple talk­ing about mov­ing towards single-header includes with GTK+. I’m not sure why this is sud­denly a big deal with­out much dis­cus­sion about whether it’s actu­ally 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, build­ing the VMware Work­sta­tion UI with and with­out 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 per­cent­age time per file is quite a bit higher than this shows; I’m esti­mat­ing that at least 60% of the “real” time is spent doing mtime checks and depen­dency analy­sis in our build system.

Per­haps there’s a good rea­son for single-header includes, and it just hasn’t been com­mu­ni­cated. Mean­while, this does have a noti­ci­ble impact for devel­op­ers on large codebases.

On the other hand, maybe we can pre­com­pile gtk.h and every­thing that comes from that?