Optimize GDBusMessage serialization
Submitted by David Zeuthen
Assigned to David Zeuthen
Link to original bug (#652650)
Description
It would be nice to optimize the way GDBusMessage parses and writes out message blobs. Right now, for correctness and to make it easy to read, we use a GMemory{Input,Output}Stream instance wrapped in a GData{Input,Output}Stream instance.
We could probably make this a couple of times faster by using a ref-counted buffer and things like g_variant_new_from_data() (where @trusted is TRUE) and g_variant_byteswap().
The test suite should already cover most (if not all) cases, if not it's really easy to add to it (see gio/tests/gdbus-serialization.c).