<p>For an example, take a look at kmod.prov (which is actually what inspired this whole thing): the core of it boils down to echoing the basename of the filename back, stripped of suffix. For each, it spawns a shell and runs external utilities. When you consider that the kernel has (tens of) thousands of modules, it adds up.</p>
<p>With the existing kmod.prov script, <code>find /lib/modules/</code>uname -r<code>| ./rpmdeps --provides</code> (consisting of ~3500 kernel modules) takes around 30s when hot in cache. The macro function version runs under two seconds, which is dominated by the file classifying.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications&email_token=ADLPZU2MA6K5OM7QDAOYYUDRBPKHHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK6QUYA#issuecomment-582814304">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU6J7HYWSD474SM2E43RBPKHHANCNFSM4KQY4CVQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZU5NXBQJ3UMBGVPTYCLRBPKHHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK6QUYA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications\u0026email_token=ADLPZU2MA6K5OM7QDAOYYUDRBPKHHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK6QUYA#issuecomment-582814304",
"url": "https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications\u0026email_token=ADLPZU2MA6K5OM7QDAOYYUDRBPKHHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK6QUYA#issuecomment-582814304",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>