qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory
@ 2015-11-23 17:44 Paolo Bonzini
  2015-11-23 17:44 ` [Qemu-devel] [PATCH v2 1/4] qjson: replace QString in JSONLexer with GString Paolo Bonzini
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Paolo Bonzini @ 2015-11-23 17:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

This patch from 2011 (!) saves about 96% of the allocation cost (down
from 500 MiB to 20 MiB) for check-qjson.

Paolo

Paolo Bonzini (4):
  qjson: replace QString in JSONLexer with GString
  qjson: do not save/restore contexts
  qjson: store tokens in a GQueue
  qjson: surprise, allocating 6 QObjects per token is expensive

 include/qapi/qmp/json-lexer.h    |   7 +-
 include/qapi/qmp/json-parser.h   |   4 +-
 include/qapi/qmp/json-streamer.h |  16 +++-
 monitor.c                        |   2 +-
 qga/main.c                       |   2 +-
 qobject/json-lexer.c             |  22 ++---
 qobject/json-parser.c            | 189 +++++++++++++++------------------------
 qobject/json-streamer.c          |  48 +++++-----
 qobject/qjson.c                  |   2 +-
 tests/libqtest.c                 |   2 +-
 10 files changed, 125 insertions(+), 169 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-11-25 18:34 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-23 17:44 [Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory Paolo Bonzini
2015-11-23 17:44 ` [Qemu-devel] [PATCH v2 1/4] qjson: replace QString in JSONLexer with GString Paolo Bonzini
2015-11-25 12:48   ` Markus Armbruster
2015-11-25 13:34     ` Paolo Bonzini
2015-11-23 17:44 ` [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts Paolo Bonzini
2015-11-23 17:59   ` Laszlo Ersek
2015-11-23 18:09     ` Paolo Bonzini
2015-11-23 19:18       ` Laszlo Ersek
2015-11-23 20:05     ` Eric Blake
2015-11-23 20:26       ` Laszlo Ersek
2015-11-24  8:03     ` Gerd Hoffmann
2015-11-24 10:50       ` Laszlo Ersek
2015-11-24 11:18         ` Paolo Bonzini
2015-11-24 12:44           ` Fam Zheng
2015-11-24 12:54             ` Paolo Bonzini
2015-11-24 13:15               ` Markus Armbruster
2015-11-24 11:33         ` Gerd Hoffmann
2015-11-24 11:39         ` Laszlo Ersek
2015-11-25 14:32   ` Markus Armbruster
2015-11-23 17:44 ` [Qemu-devel] [PATCH v2 3/4] qjson: store tokens in a GQueue Paolo Bonzini
2015-11-23 17:44 ` [Qemu-devel] [PATCH v2 4/4] qjson: surprise, allocating 6 QObjects per token is expensive Paolo Bonzini
2015-11-23 21:00 ` [Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory Eric Blake
2015-11-25 14:47 ` Markus Armbruster
2015-11-25 18:08   ` Paolo Bonzini
2015-11-25 18:34     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).