Eric Blake <ebl...@redhat.com> writes:

> On 05/24/2013 07:08 AM, Luiz Capitulino wrote:
>> This sounds like premature optimization to me, but I wonder if instead
>> of cluttering commands with arguments to do the filtering we could add
>> some standard way of doing this in the QAPI.
>
> Maybe we could make QAPI support generic filtering for all query-*
> commands.  But there's still a cost with making all query-* commands
> malloc the space for an entire list only to then have a QAPI layer on
> top of it do filtering before handing back the single element over the
> wire, compared to passing the filtering down to the query-*
> implementation to do the filtering in place.

I'd expect the time spent on malloc to be dwarved several times over by
I/O latency.

If we worry about malloc impacting our latency, then we should not be
using QAPI!  It's really, really malloc-happy.

In QMP, we generally don't.

>> It was you who suggested a filter command?
>
> No, Stefan suggested it on v1:
> https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03102.html

So far, I'm with Luiz here.

Reply via email to