qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 2/3] block: Emit modules in bdrv_iterate_format(


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH 2/3] block: Emit modules in bdrv_iterate_format()
Date: Wed, 2 Nov 2016 12:15:24 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 02.11.2016 um 11:52 hat Hao QingFeng geschrieben:
> Sorry for a bit late response. The function looks fine but just some
> doubt on g_renew in this piece of code(and the legacy), does
> g_renew(realloc) has much performance impact if it's call many times
> since alloc and memory copy are both also run many times?  So how
> about increase the memory for more instead of 1 each time?
> 
> formats = g_renew(const char *, formats, count + 10);
> 
> A new counter also needs to be introduced to record the space size.

This code is not on a hot path, so keeping the code simple and easy to
maintain is preferrable to complicating it just so --help can save a few
CPU cycles.

Kevin



reply via email to

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