lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 22 Aug 2020 23:56:09 +0900
From:   Masahiro Yamada <>
Cc:     Nathan Huckleberry <>,
        Nick Desaulniers <>,
        Tom Roeder <>,,
        Masahiro Yamada <>,
Subject: [PATCH v3 01/10] gen_compile_commands: parse only the first line of .*.cmd files

After the allmodconfig build, this script takes about 5 sec on my
machine. Most of the run-time is consumed for needless regex matching.

We know the format of .*.cmd file; the first line is the build command.
There is no need to parse the rest.

With this optimization, now it runs 4 times faster.

Signed-off-by: Masahiro Yamada <>
Reviewed-by: Nick Desaulniers <>
Tested-by: Nick Desaulniers <>

(no changes since v2)

Changes in v2:
  - Remove the unneeded variable 'line'

 scripts/ | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/scripts/ b/scripts/
index c458696ef3a7..1bcf33a93cb9 100755
--- a/scripts/
+++ b/scripts/
@@ -125,11 +125,8 @@ def main():
             filepath = os.path.join(dirpath, filename)
             with open(filepath, 'rt') as f:
-                for line in f:
-                    result = line_matcher.match(line)
-                    if not result:
-                        continue
+                result = line_matcher.match(f.readline())
+                if result:
                         entry = process_line(directory, dirpath,

Powered by blists - more mailing lists