This avoids loading and parsing the reference log when not needed.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 282906e62..51932965c 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -888,10 +888,12 @@ sub GetNewLogErrors($$$) { my ($RefFileName, $Groups, $Errors) = @_;
+ my (@NewGroups, %NewErrors, %NewIndices); + return (@NewGroups, %NewErrors, %NewIndices) if (!@$Groups); + my ($RefGroups, $RefErrors) = GetLogErrors($RefFileName); return (undef, undef) if (!$RefGroups);
- my (@NewGroups, %NewErrors, %NewIndices); foreach my $GroupName (@$Groups) { if ($RefErrors->{$GroupName})