Markus Armbruster <arm...@redhat.com> writes: > Our qapi-schema.json is composed of modules connected by include > directives, but the generated code is monolithic all the same: one > qapi-types.h with all the types, one qapi-visit.h with all the > visitors, and so forth. These monolithic headers get included all > over the place. In my "build everyhing" tree, adding a QAPI type > recompiles about 4500 out of 4800 objects. > > Nobody would write such monolithic headers by hand. It stands to > reason that one shouldn't generate them, either. > > This series' basic idea is to split up generated headers to mirror the > schema's modular structure: one header per module. That way, you can > include just what you need. > > The series is RFC for a number of reasons: > > * The split is implemented only for qapi-types.h. That one should > provide the biggest benefits, though. > > * There's a bit of code duplication. > > * I haven't re-read my patches, yet.
And of course * Needs a doc update [...]