mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: compile regexp in computeClientArray by Sidey (Forum #125292)
git-svn-id: https://svn.fhem.de/fhem/trunk@25517 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
454fe2d41f
commit
94bad86e14
@ -5174,10 +5174,11 @@ computeClientArray($$)
|
||||
@a = grep { $modules{$_} && $modules{$_}{Match} } @mRe;
|
||||
|
||||
} else {
|
||||
my @cmRe = map { qr/^$_$/ } @mRe; # 125292, precompile, speedup 5x for CUL
|
||||
foreach my $m (sort { $modules{$a}{ORDER}.$a cmp $modules{$b}{ORDER}.$b }
|
||||
grep { defined($modules{$_}{ORDER}) } keys %modules) {
|
||||
foreach my $re (@mRe) {
|
||||
if($m =~ m/^$re$/) {
|
||||
foreach my $re (@cmRe) {
|
||||
if($m =~ $re) {
|
||||
push @a, $m if($modules{$m}{Match});
|
||||
last;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user