From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6gUR-0004JV-Rg for qemu-devel@nongnu.org; Fri, 24 Jan 2014 08:08:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6gUK-0006eY-VJ for qemu-devel@nongnu.org; Fri, 24 Jan 2014 08:08:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6gUK-0006eI-Np for qemu-devel@nongnu.org; Fri, 24 Jan 2014 08:08:00 -0500 Message-ID: <52E265AA.6050207@redhat.com> Date: Fri, 24 Jan 2014 06:07:54 -0700 From: Eric Blake MIME-Version: 1.0 References: <1390488396-16538-1-git-send-email-akong@redhat.com> <1390488396-16538-6-git-send-email-akong@redhat.com> <52E251E8.5020201@redhat.com> In-Reply-To: <52E251E8.5020201@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ew5mXaxq499eRLagDB5Ha4ctC4lqdC5PW" Subject: Re: [Qemu-devel] [PATCH v4 5/5] update docs/qmp-full-introspection.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Amos Kong , qemu-devel@nongnu.org Cc: qiaonuohan@cn.fujitsu.com, lcapitulino@redhat.com, xiawenc@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ew5mXaxq499eRLagDB5Ha4ctC4lqdC5PW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/24/2014 04:43 AM, Paolo Bonzini wrote: > Il 23/01/2014 15:46, Amos Kong ha scritto: >> +The whole schema information will be returned in one go, it contains >> +all the schema entries. It doesn't support to be filtered by type >> +or name. Currently it takes about 4 seconds to return about 1.7M stri= ng. >> +Management only needs to execute this command once after installing >> +QEMU package. >> + But management has to call the command for every variant of the qemu binary that it plans on driving - on a system with multiple qemu-* for targetting multiple target types, this starts to border on unacceptably long for libvirt. And while libvirt might use this command to learn about what is supported for a handful of specific commands, making libvirt store 1.7M + additional memory for its JSON parse of that data per qemu starts to add up fast, if libvirt were to keep that data around for the life of libvirtd rather than just learning what it needs from the string and discarding the string up front. We've just made an argument for WHY we need filtering to just a given type/command. >=20 > This is quite a lot. >=20 > Without comments, qapi-schema.json is 27k. I'd expect the DataObject > representation to be in the ballpark of 100-200k. >=20 > I don't understand why is it necessary to expand all the types in the > result? Any time a type is returned at the top level in the same query (such as in your global query), management can look up any unexpanded type in the same result. I could understand expanding the results when returning only a subset of the tree (that is, when filtering is added, asking for a single type should give me all information about that type, including the subtypes it references, without me having to make multiple calls to learn about the subtypes), but even then, it might be worth having an optional boolean flag on the query that says whether I want expansion vs. compact results. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ew5mXaxq499eRLagDB5Ha4ctC4lqdC5PW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJS4mWqAAoJEKeha0olJ0NqmRMH/2q6d3W8XjM359yYcdFRVwKB Sa+E9OkI6WTLE20xPTO7Xcv61ISU+VX3xcbOfRrMdpBnhwMKV5XcD8BXd2cmO2x1 dLNDRDTtj6NShmkfd/3UA3EtRoXMa/BaICbJKb4bl6hpvhAa1wPF0SgulUexrhDR Xzjdqi6is6Trjk6d8EszOTR3OPCGcPqb7xlLJ06I+KnJ3Aa3qjSBscZqrsrx8kWs zfKE1sPC/eBRUs+FaBsZGRfTNt6tb7jYGi3oygxt6zAKNEx2V7AeKGtHb0p9cIrp 29PLXC76+9SwrqU1XTNoJsyLZtm0xIKG0nYduKMptaeqnk+VkePZsGAjG7zMcPU= =/+s4 -----END PGP SIGNATURE----- --ew5mXaxq499eRLagDB5Ha4ctC4lqdC5PW--