From d953a14d87c2445a19c72157762d58547c97f753 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 8 Dec 2019 17:10:14 +0000 Subject: [PATCH] commandref_join.pl: speed up processing with "-noWarnings" (Forum #105079) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20690 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/commandref_join.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/contrib/commandref_join.pl b/contrib/commandref_join.pl index 9af46b98e..126084886 100755 --- a/contrib/commandref_join.pl +++ b/contrib/commandref_join.pl @@ -173,9 +173,19 @@ generateModuleCommandref($$;$$) } elsif(!$skip) { print $fh $l if($fh); + if($l =~ m,INSERT_DOC_FROM: ([^ ]+)/([^ /]+) ,) { + my ($dir, $re) = ($1, $2); + if(opendir(DH, $dir)) { + foreach my $file (grep { m/^$2$/ } readdir(DH)) { + generateModuleCommandref("$dir/$file", $lang, $fh, 1); + } + closedir(DH); + } + } chkAndGenLangLinks($l, $lang, $fh); $docCount++; + next if($noWarnings); $hasLink = ($l =~ m/]+)>/i) { @@ -194,15 +204,6 @@ generateModuleCommandref($$;$$) $llwct{$tag} = $line if(!$tagcount{$tag}); } - if($l =~ m,INSERT_DOC_FROM: ([^ ]+)/([^ /]+) ,) { - my ($dir, $re) = ($1, $2); - if(opendir(DH, $dir)) { - foreach my $file (grep { m/^$2$/ } readdir(DH)) { - generateModuleCommandref("$dir/$file", $lang, $fh, 1); - } - closedir(DH); - } - } } } close($modFh);