computology / computology-packagecloud

Puppet module for packagecloud.io
Apache License 2.0
9 stars 29 forks source link

optimize check for pygpgme #39

Open kpankonen opened 6 years ago

kpankonen commented 6 years ago

We were doing some profiling to troubleshoot slow puppet runs and noticed that this fact was taking longer than we'd expect. This change speeds it up by only checking for the pygpgme package

[root@389f9a260f7a /]$ time (rpm -qa |grep pygpgme)  
pygpgme-0.3-9.el7.x86_64

real    0m0.867s
user    0m0.135s
sys 0m0.065s
[root@389f9a260f7a /]$ time (rpm -q pygpgme)  
pygpgme-0.3-9.el7.x86_64

real    0m0.033s
user    0m0.024s
sys 0m0.009s
[root@6f1cf2b76513 /]$ rpm -q fakepackage
package fakepackage is not installed
yakirgb commented 3 years ago

Thank you @kpankonen , just added this fix to our internal repo