Skip to contentSkip to conversation

Speedup patch ping

DISCUSSION Duncan Roe 1 participant 2 messages Jul 20, 2024 netfilter

lore
Share & tools
lore

Duncan Roe

author
#0 lore raw

Hi Pablo,

Did you notice my build speedup patch
https://patchwork.ozlabs.org/project/netfilter-devel/patch/[email protected]/

The patch reduces the time taken by build_man.sh by about 10 times (on a system with 16+ cores) with overall CPU use being halved.

I sent a single patch because only 1 file is changed. Would you rather have the development series? There are 17 patches: add time commands + 15 speedups + remove time commands.

You can run the attached script to verify doxygen/man/ is unchanged (and in libnetfilter_log as well).

Cheers ... Duncan.

#!/bin/sh
#set -x
opts=""
while [ $(echo -- "$1"|cut -c4) = '-' ]
do
opts="$opts $1"
shift
done
if [ -z "$1" -o -z "$2" ];then
echo "Usage:- $(basename "$0") [diff opts] <dir1> <dir to be compared to dir1>"
exit 1
fi
find "$1" -name CVS -prune -o -name .git -prune -o -type d ! -name RCS -exec sh -c "diff $opts \"{}\" \"\$(echo \"{}\" | sed s?^\"$1\"?\"$2\"?)\"" \; 2>&1|glb -v '^Common subdirectories: '

author
#1 lore raw

Hi again Pablo,

Quoted 8 lines · Duncan Roe

Hi Pablo,

Did you notice my build speedup patch
https://patchwork.ozlabs.org/project/netfilter-devel/patch/[email protected]/

The patch reduces the time taken by build_man.sh by about 10 times (on a system with 16+ cores) with overall CPU use being halved.

Quoted 8 lines

I sent a single patch because only 1 file is changed. Would you rather have the development series? There are 17 patches: add time commands + 15 speedups + remove time commands.

You can run the attached script to verify doxygen/man/ is unchanged (and in libnetfilter_log as well).

Cheers ... Duncan.

Sorry, diffdir as I posted used glb from my command-line toolbox. This one doesn't.

Cheers ... Duncan.

#!/bin/sh
#set -x
opts=""
while [ $(echo -- "$1"|cut -c4) = '-' ]
do
opts="$opts $1"
shift
done
if [ -z "$1" -o -z "$2" ];then
echo "Usage:- $(basename "$0") [diff opts] <dir1> <dir to be compared to dir1>"
exit 1
fi
find "$1" -name CVS -prune -o -name .git -prune -o -type d ! -name RCS -exec sh -c "diff $opts \"{}\" \"\$(echo \"{}\" | sed s?^\"$1\"?\"$2\"?)\"" \; 2>&1|grep -E --line-buffered -v '^Common subdirectories: '