Re: [RFC PATCH 0/5] various optimizations

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> writes:

> I'd suggest using oprofile or sysprof to collect data on exactly
> where our cputime is disappearing to before trying to optimize
> further.


I've seen that creating and accessing many gobjects, as this chunk of
code in osinfo_loader.c does, takes a lot of cputime:

                OsinfoDevice *dev = osinfo_loader_get_device(loader, id);
                osinfo_entity_set_param(OSINFO_ENTITY(dev),
                                        OSINFO_DEVICE_PROP_VENDOR_ID,
                                        vendor_id);
                osinfo_entity_set_param(OSINFO_ENTITY(dev),
                                        OSINFO_DEVICE_PROP_VENDOR,
                                        vendor);
                osinfo_entity_set_param(OSINFO_ENTITY(dev),
                                        OSINFO_DEVICE_PROP_PRODUCT_ID,
                                        device_id);
                osinfo_entity_set_param(OSINFO_ENTITY(dev),
                                        OSINFO_DEVICE_PROP_PRODUCT,
                                        device);
                osinfo_entity_set_param(OSINFO_ENTITY(dev),
                                        OSINFO_DEVICE_PROP_BUS_TYPE,
                                        busType);

I am not sure how to optimize this part, I will look if I can avoid
somehow the preloading of the entire devices DB.

Regards,
Giuseppe

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




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

  Powered by Linux