Skip to content

WIP: Use pre-parsed xml for GtkBuilder resource files

Alexander Larsson requested to merge wip/alexl/gtkbuilder-xml-preparse into master

I made this glib branch: https://gitlab.gnome.org/GNOME/glib/tree/wip/alexl/gmarkup-record It adds a feature to GMarkup where you can record the result of a xml parse as a binary blob, and then very efficiently replay it. (It essentially records all the callbacks done during parsing in an array which are then replayed in order.) It also adds support to glib-compile-resources for the "xml-preparse" option.

This is then usen in GtkBuilder by just enabling the new option, and recognizing the magic header "GMU\0" for the binary format in _gtk_builder_parser_parse_buffer(). This is enough to make all the built-in template widget avoid parsing xml each time an instance is created.

Merge request reports