[Libguestfs] [PATCH] tests/c-api: cache available features

Pino Toscano ptoscano at redhat.com
Thu Nov 5 15:56:21 UTC 2015


On Wednesday 04 November 2015 20:55:13 Richard W.M. Jones wrote:
> On Wed, Nov 04, 2015 at 06:42:13PM +0100, Pino Toscano wrote:
> > Build a list of all the features used in action tests, and lazily read
> > them as needed.  This reduces the number of guestfs_feature_available
> > calls for a full run from 117 to 18.
> 
> ACK.
> 
> But even better if you turned guestfs_feature_available into a
> non_daemon_function, added a new guestfs_internal_feature_available
> daemon_function, and then cached the results on the library side.
> They can never change for the duration of a libguestfs library load,
> as far as I know.
> 
> That would benefit all libguestfs users.

You are right indeed, that will be better; patches for that coming up
in a minute.

Please discard this patch.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20151105/92742cce/attachment.sig>


More information about the Libguestfs mailing list