build: use xml-stripblanks with .ui resources

This adds a preprocess step to the .ui files to strip them of blank
characters. It also removes the compressed='true' from the .ui files since
that involves creating lots of decompressor objects when creating widgets.
Doing so has runtime overhead and slows down the creation of initial
application windows.

The .ui files are left compressed for the Inspector, since that is not in
the core performance path of application startup.
This commit is contained in:
Christian Hergert 2017-11-12 15:18:21 -08:00
parent 9156908a3a
commit f05865ad3a

View File

@ -1309,7 +1309,7 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
done; \
for f in $(srcdir)/ui/*.ui; do \
n=`basename $$f`; \
echo " <file compressed='true'>ui/$$n</file>" >> $@; \
echo " <file preprocess='xml-stripblanks'>ui/$$n</file>" >> $@; \
done; \
for s in 16x16 22x22 24x24 32x32 48x48; do \
for c in actions status; do \
@ -1322,7 +1322,7 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
done; \
for f in $(srcdir)/inspector/*.ui; do \
n=`basename $$f`; \
echo " <file compressed='true'>inspector/$$n</file>" >> $@; \
echo " <file compressed='true' preprocess='xml-stripblanks'>inspector/$$n</file>" >> $@; \
done; \
echo " <file>inspector/logo.png</file>" >> $@; \
echo " <file>emoji/emoji.data</file>" >> $@; \