qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] json-parser: don't replicate tokens at each lev


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] json-parser: don't replicate tokens at each level of recursion
Date: Mon, 13 Aug 2012 20:49:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Michael Roth <address@hidden> writes:

> Currently, when parsing a stream of tokens we make a copy of the token
> list at the beginning of each level of recursion so that we do not
> modify the original list in cases where we need to fall back to an
> earlier state.
>
> In the worst case, we will only read 1 or 2 tokens off the list before
> recursing again, which means an upper bound of roughly N^2 token allocations.
>
> For a "reasonably" sized QMP request (in this a QMP representation of
> cirrus_vga's device state, generated via QIDL, being passed in via
> qom-set), this caused my 16GB's of memory to be exhausted before any
> noticeable progress was made by the parser. The command is here for
> reference, and can be issued against upstream QMP to reproduce (failure
> occurs before any qmp command routing/execution):
>
> http://pastebin.com/mJrZ3Ctg

Commit messages are forever, pastebins aren't.

What about preserving your test case for eternity under tests/?

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]