* On 2026-01-15 at 22:36 GMT, Thomas Klausner wrote:
On Tue, Jan 06, 2026 at 03:59:36AM +0100, Taylor R Campbell wrote:The pkg_summary(5) file documents the following syntax: FILE_CKSUM (optional) A checksum type supported by digest(1) and checksum separated by space character. But it was apparently never implemented in `pkg_info -X'. This patch implements it, with SHA256 for now.The patch looks fine. I'm just curious about one thing: Are there any common tasks that call 'pkg_info -X' and will now be slowed down because every file listed in the summary file will now be read?
As it happens I've been adding binary package support to pkgsrc-rs this week, and have been doing some performance work while ensuring it is compatible with pkg_install.
tl;dr: Yeh this slows things down a LOT, going from 22 seconds to almost 12 minutes. To generate a pkg_summary from a directory of binary packages:
Baseline:
| real | user | sys | rss |
| pkg_info | 21.9s | 19.8s | 1.8s | 900MB |
| pkgsrc-rs -j1 | 17.0s | 15.1s | 1.8s | 408MB |
| pkgsrc-rs -j12 | 2.8s | 21.4s | 4.5s | 560MB |
FILE_CKSUM:
| real | user | sys | rss |
| pkg_info | 11m46.7s | 9m34.8s | 1m58.5s | 900MB |
| pkgsrc-rs -j1 | 3m15.2s | 1m40.8s | 1m34.4s | 401MB |
| pkgsrc-rs -j12 | 28.8s | 1m42.3s | 3m31.3s | 457MB |
So in the default pkg_info case it is around 32x slower. Also someone
might want to investigate why pkg_info needs nearly 1GB of RSS even
without it.
Personally I'm not hugely keen on this. I've always ensured that my binary packages are published correctly and do not end up with package vs pkg_summary mismatches. I can just keep this one out of my tree or accelerate moving over to Rust tooling, but I'd prefer people just ensured their publishing is atomic.
-- Jonathan Perkin pkgsrc.smartos.org Open Source Complete Cloud www.tritondatacenter.com