Re: [PATCH v2 17/23] conf: convert over to use GRegex for regular expressions

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

 



On Wed, Oct 09, 2019 at 10:08:32AM +0200, Bjoern Walk wrote:
> Daniel P. Berrangé <berrange@xxxxxxxxxx> [2019-10-07, 06:14PM +0100]:
> > @@ -2306,20 +2304,17 @@ virDomainQemuMonitorEventStateRegisterID(virConnectPtr conn,
> >          return -1;
> >      data->flags = flags;
> >      if (event && flags != -1) {
> > -        int rflags = REG_NOSUB;
> > -
> > -        if (flags & VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_NOCASE)
> > -            rflags |= REG_ICASE;
> >          if (flags & VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX) {
> > -            int err = regcomp(&data->regex, event, rflags);
> > +            int cflags = 0;
> 
> Do we want to use G_REGEX_OPTIMIZE here?

Yes, makes sense for this one as we compile it once and then us it
to match every single event emitted on every guest. So the optimization
cost will be mitigated by improved matching performance.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux