From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu1Rp-0002YA-5v for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uu1Rm-00087L-FO for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:20:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu1Rm-00086w-37 for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:20:46 -0400 Date: Tue, 2 Jul 2013 10:20:39 -0400 From: Luiz Capitulino Message-ID: <20130702102039.56aa458a@redhat.com> In-Reply-To: <20130702083729.GA12400@amosk.info> References: <1371644677-11041-1-git-send-email-akong@redhat.com> <20130620232021.27a96a20@redhat.com> <20130702083729.GA12400@amosk.info> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] full introspection support for QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qiaonuohan@cn.fujitsu.com, pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, armbru@redhat.com On Tue, 2 Jul 2013 16:37:29 +0800 Amos Kong 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. Let's do your approach for now. If having this in memory turns out to be a problem, we could try compacting it.