See: http://blogs.testbit.eu/timj/2005/09/23/23092005/ (page moved)
The other day we had been looking some into Gtk+ startup time and found that adding lots of widgets to a window hierarchy in combination with extensive gtkrc file usage, can result in RC style matching showing up with significant figures in the profiles. The basic RC style match logic in Gtk+ already had been optimized a great extend in 1998, and with recent patches from Matthias Clasen, the complexity of wildcard string matches in GPatternSpec was furtherly reduced.
That’s as far as optimizing the code goes, however significant optimizations can also be gained from modifications to the set of RC style match rules in the gtkrc files. So in order to enable everyone to performance optimize their gtkrc file rules, we have compiled a list of optimization directives to apply to existing gtkrc files:
[Optimizing RC style matches in gtkrc files]