Re: pbulk-index performance improvement

Jonathan Perkin <[email protected]> Tue, 24 Mar 2026 15:52:50 +0000
Newsgroups gmane.os.netbsd.devel.packages
Message-ID <[email protected]>
* On 2025-12-23 at 15:07 GMT, Jonathan Perkin wrote:

>Here's a diff that in theory avoids this problem for packages that do 
>not support multi-version in their PKGNAME:
>
>  https://gist.github.com/jperkin/ce0b765a3a868389b09e235b58105a32
>
>Testing this in parallel/slurm-wlm takes the scan time from:
>
>  $ time bmake pbulk-index >/dev/null
>  real	1m32.376s
>  user	0m42.333s
>  sys	0m36.232s
>
>down to:
>
>  $ time bmake pbulk-index >/dev/null
>  real	0m2.027s
>  user	0m0.938s
>  sys	0m0.796s

Now that bob has a decent amount of tooling for testing things like 
this, I've discovered that it's unworkable due to a couple of packages:

   lang/ruby
   www/unit-python

ruby expands RUBY_VERSION and unit-python expands PYVERSSUFFIX, and 
while we could add additional checks for these variables, I feel this is 
just a landmine waiting to explode when some other new package starts 
using a different variable that isn't matched yet.

I'm out of ideas for how to do this in a reliable way (e.g. trying to 
uniq'ify PKGNAME just runs into the same problem as you have to pay the 
parse tax up-front), so until a novel solution presents itself then I 
retract this proposal.

-- 
Jonathan Perkin                    pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com