Skip to content

Commit

Permalink
script.sh: do not sort ctags output
Browse files Browse the repository at this point in the history
By default ctags sorts entries. This is not useful to the update script,
but takes time.
user time for `update.py 16` on musl v1.2.5 went from 1m21.613s to
1m11.849s.
  • Loading branch information
fstachura committed Dec 21, 2024
1 parent 3622d67 commit b58cc27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ parse_defs_C()
git cat-file blob "$opt1" > "$full_path"

# Use ctags to parse most of the defs
ctags -x --kinds-c=+p+x --extras='-{anonymous}' "$full_path" |
ctags -u -x --kinds-c=+p+x --extras='-{anonymous}' "$full_path" |
grep -avE "^operator |CONFIG_" |
awk '{print $1" "$2" "$3}'

Expand All @@ -182,7 +182,7 @@ parse_defs_K()
tmp=`mktemp -d`
full_path=$tmp/$opt2
git cat-file blob "$opt1" > "$full_path"
ctags -x --language-force=kconfig --kinds-kconfig=c --extras-kconfig=-{configPrefixed} "$full_path" |
ctags -u -x --language-force=kconfig --kinds-kconfig=c --extras-kconfig=-{configPrefixed} "$full_path" |
awk '{print "CONFIG_"$1" "$2" "$3}'
rm "$full_path"
rmdir $tmp
Expand All @@ -193,7 +193,7 @@ parse_defs_D()
tmp=`mktemp -d`
full_path=$tmp/$opt2
git cat-file blob "$opt1" > "$full_path"
ctags -x --language-force=dts "$full_path" |
ctags -u -x --language-force=dts "$full_path" |
awk '{print $1" "$2" "$3}'
rm "$full_path"
rmdir $tmp
Expand Down

0 comments on commit b58cc27

Please sign in to comment.