On Tue, Jul 02, 2013 at 10:20:39AM -0400, Luiz Capitulino wrote: > On Tue, 2 Jul 2013 16:37:29 +0800 > Amos Kong <ak...@redhat.com> wrote: > > > > Btw, I find your approach interesting but I'm wondering if it's going to > > > be a good thing to keep all the schema in memory. Do you have an idea > > > on its size? > > > > The size of qmp_schema_table[] is 1528 bytes. > > > > method 2rd: > > save the raw json strings to qmp-schema.txt, allocate dynamical > > qmp_schema_table[] in qmp_query_qmp_schema(), and restore the > > file content to the table, free it at the end of qmp_query_qmp_schema() > > Well, keeping a file around like that doesn't look like a good solution.
If we keep it in a file, we need to install the file to system. If the file is changed after installing, it's risk. > Let's do your approach for now. If having this in memory turns out to > be a problem, we could try compacting it. Ok, I will still define a big table in head file. Current 1528 bytes is not very big. -- Amos.