mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 23:06:05 +00:00
93_DbRep: reduce memory allocation of reduceLog command
git-svn-id: https://svn.fhem.de/fhem/trunk@26429 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d046f253f0
commit
9ac252df2a
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- change: 93_DbRep: reduce memory allocation of reduceLog command
|
||||
- change: 88_HMCCU: Bug fixes and improvements
|
||||
- change: 93_DbRep: enable setter 'index' for device model 'Agent'
|
||||
- bugfix: 70_Klafs: Transferred to namespace of FHEM.
|
||||
|
@ -57,6 +57,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
||||
|
||||
# Version History intern
|
||||
my %DbRep_vNotesIntern = (
|
||||
"8.50.3" => "19.09.2022 reduce memory allocation of function DbRep_reduceLog ",
|
||||
"8.50.2" => "17.09.2022 release setter 'index' for device model 'Agent' ",
|
||||
"8.50.1" => "05.09.2022 DbRep_setLastCmd, change changeValue syntax, minor fixes ",
|
||||
"8.50.0" => "20.08.2022 rework of DbRep_reduceLog - add max, max=day, min, min=day, sum, sum=day ",
|
||||
@ -8944,7 +8945,6 @@ sub DbRep_reduceLog {
|
||||
my $ots = $paref->{rsn} // "";
|
||||
|
||||
my @a = @{$hash->{HELPER}{REDUCELOG}};
|
||||
#my $rlpar = join " ", @a;
|
||||
|
||||
my $err = q{};
|
||||
|
||||
@ -9117,7 +9117,7 @@ sub DbRep_reduceLog {
|
||||
$err = _DbRep_rl_deleteDayRows ($params);
|
||||
return "$name|$err" if ($err);
|
||||
|
||||
@dayRows = ();
|
||||
undef @dayRows;
|
||||
}
|
||||
|
||||
if ($mode =~ /average|max|min|sum/i) {
|
||||
@ -9140,7 +9140,7 @@ sub DbRep_reduceLog {
|
||||
$err = _DbRep_rl_updateHour ($params);
|
||||
return "$name|$err" if ($err);
|
||||
|
||||
@updateHour = ();
|
||||
undef @updateHour;
|
||||
}
|
||||
|
||||
if ($mode =~ /=day/i && scalar @updateDay) {
|
||||
@ -9165,9 +9165,9 @@ sub DbRep_reduceLog {
|
||||
|
||||
}
|
||||
|
||||
%hourlyKnown = ();
|
||||
@updateHour = ();
|
||||
@updateDay = ();
|
||||
undef %hourlyKnown;
|
||||
undef @updateHour;
|
||||
undef @updateDay;
|
||||
$currentHour = 99;
|
||||
}
|
||||
|
||||
@ -9182,7 +9182,7 @@ sub DbRep_reduceLog {
|
||||
push(@updateHour, {%hourlyKnown});
|
||||
}
|
||||
|
||||
%hourlyKnown = ();
|
||||
undef %hourlyKnown;
|
||||
$currentHour = $hour;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user