[libvirt PATCH 0/5] Waste less CPU on syntax-check

Ján Tomko posted 5 patches 2 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1629381994.git.jtomko@redhat.com
build-aux/syntax-check.mk        | 218 ++---------------------------
build-aux/useless-if-before-free | 226 -------------------------------
build-aux/vc-list-files          | 113 ----------------
3 files changed, 9 insertions(+), 548 deletions(-)
delete mode 100755 build-aux/useless-if-before-free
delete mode 100755 build-aux/vc-list-files
[libvirt PATCH 0/5] Waste less CPU on syntax-check
Posted by Ján Tomko 2 years, 8 months ago
Use 'git ls-tree' directly instead of a wrapper script that
can possibly handle all the other versioning systems we do not use.

Instead of adding, removing, then re-adding the absolute path prefix,
only add it once per every syntax check rule.

Delete the useless-if-before-free check since we've been ignoring
its output anyway.

This speeds up 'ninja test' on my 8-core laptop from:
  19.781 s ±  0.174 s
    to
  15.476 s ±  1.302 s

Ján Tomko (5):
  syntax-check: assume we're using git
  syntax-check: use VC_LIST_EXCEPT instead of VC_LIST
  syntax-check: replace vc-list-files
  syntax-check: drop useless useless-if-before-free
  syntax-check: remove _test_script_regex

 build-aux/syntax-check.mk        | 218 ++---------------------------
 build-aux/useless-if-before-free | 226 -------------------------------
 build-aux/vc-list-files          | 113 ----------------
 3 files changed, 9 insertions(+), 548 deletions(-)
 delete mode 100755 build-aux/useless-if-before-free
 delete mode 100755 build-aux/vc-list-files

-- 
2.31.1

Re: [libvirt PATCH 0/5] Waste less CPU on syntax-check
Posted by Michal Prívozník 2 years, 8 months ago
On 8/19/21 4:12 PM, Ján Tomko wrote:
> Use 'git ls-tree' directly instead of a wrapper script that
> can possibly handle all the other versioning systems we do not use.
> 
> Instead of adding, removing, then re-adding the absolute path prefix,
> only add it once per every syntax check rule.
> 
> Delete the useless-if-before-free check since we've been ignoring
> its output anyway.
> 
> This speeds up 'ninja test' on my 8-core laptop from:
>   19.781 s ±  0.174 s
>     to
>   15.476 s ±  1.302 s
> 
> Ján Tomko (5):
>   syntax-check: assume we're using git
>   syntax-check: use VC_LIST_EXCEPT instead of VC_LIST
>   syntax-check: replace vc-list-files
>   syntax-check: drop useless useless-if-before-free
>   syntax-check: remove _test_script_regex
> 
>  build-aux/syntax-check.mk        | 218 ++---------------------------
>  build-aux/useless-if-before-free | 226 -------------------------------
>  build-aux/vc-list-files          | 113 ----------------
>  3 files changed, 9 insertions(+), 548 deletions(-)
>  delete mode 100755 build-aux/useless-if-before-free
>  delete mode 100755 build-aux/vc-list-files
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal