K 10 svn:author V 7 git2svn K 8 svn:date V 27 2021-07-05T12:02:56.399295Z K 7 svn:log V 576 pfctl: cache getprotobynumber results As for example pfctl -ss keeps calling it, it saves a lot of overhead from elided parsing of /etc/nsswitch.conf and /etc/protocols. Sample result when running a pre-nvlist binary with nfs root and dumping 7 mln states: before: 24.817u 62.993s 1:28.52 99.1% after: 8.064u 1.117s 0:18.87 48.5% Idea by Jim Thompson Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 858937bea4599d254a97ee6321683f8629604e15) Git Hash: 98fd94dc83319db1b6bfc9f741245eefb0af7911 Git Author: mjg@FreeBSD.org END