From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1iao-0000Sd-W8 for qemu-devel@nongnu.org; Wed, 25 Nov 2015 17:31:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1ial-0001rK-0L for qemu-devel@nongnu.org; Wed, 25 Nov 2015 17:31:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1iak-0001rF-Qt for qemu-devel@nongnu.org; Wed, 25 Nov 2015 17:31:10 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6CE8391C16 for ; Wed, 25 Nov 2015 22:31:10 +0000 (UTC) References: <1448486613-17634-1-git-send-email-armbru@redhat.com> <1448486613-17634-12-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <565636AD.2050502@redhat.com> Date: Wed, 25 Nov 2015 15:31:09 -0700 MIME-Version: 1.0 In-Reply-To: <1448486613-17634-12-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9nTXiUoVNwJvj8PDPpSkx84ixrHT2mphQ" Subject: Re: [Qemu-devel] [PATCH v3 for-2.5 11/12] qjson: surprise, allocating 6 QObjects per token is expensive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9nTXiUoVNwJvj8PDPpSkx84ixrHT2mphQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/25/2015 02:23 PM, Markus Armbruster wrote: > From: Paolo Bonzini >=20 > Replace the contents of the tokens GQueue with a simple struct. This c= uts > the amount of memory allocated by tests/check-qjson from ~500MB to ~20M= B, > and the execution time from 600ms to 80ms on my laptop. Still a lot (s= ome > could be saved by using an intrusive list, such as QSIMPLEQ, instead of= > the GQueue), but the savings are already massive and the right thing to= > do would probably be to get rid of json-streamer completely. >=20 > Signed-off-by: Paolo Bonzini > Message-Id: <1448300659-23559-5-git-send-email-pbonzini@redhat.com> > [Straightforwardly rebased on my patches] > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/json-streamer.h | 7 +++ > qobject/json-parser.c | 115 ++++++++++++++++---------------= -------- > qobject/json-streamer.c | 19 +++---- > 3 files changed, 63 insertions(+), 78 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9nTXiUoVNwJvj8PDPpSkx84ixrHT2mphQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWVjatAAoJEKeha0olJ0NqjEwH/3EqXnW1pOCKEahpg8tgyigJ zg8e0rmLXJR7k99AlSIFioIjD6meOihOjmQZ7h6xa90o7DJniBQ9hebu1fF5Ae8Y ralkiqqfZwGUuu54kg8CPPfn2ElodaZt+58pdoYWAr6Oy2U9hsknT+D9IDxp+2IW sjG67hdH0ctDX5IbwjapYs4vkbrygMWZgeavKDRS+4nv+ROd3XwFitCApawVh5+W D6yCbYGgq6Yzd5YOT6PYPKqB4q5969t3PsmR5WkmgwUr/njJ5doo/WwibOX72JIX 5+9z/BwONurhHBlDz1DvlHnq1Rfs9xjDfU0l71/hxT53drUWGXKwgkH6iiEfld8= =FLdO -----END PGP SIGNATURE----- --9nTXiUoVNwJvj8PDPpSkx84ixrHT2mphQ--