mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
57_Calendar: reduce memory footprint (forum #74481)
git-svn-id: https://svn.fhem.de/fhem/trunk@14820 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
581d7cf1dd
commit
e873f9f714
@ -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.
|
||||
- feature: 57_Calendar: reduce memory footprint (forum #74481)
|
||||
- bugfix: 74_AMADDevice: fix openurl bug
|
||||
- bugfix: 49_SSCam: "uninitialized value in pattern ..." on fhem start
|
||||
- feature: 49_SSCam: V2.4.0, new commands "snapinfo" and
|
||||
|
@ -1567,7 +1567,7 @@ sub Calendar_Initialize($) {
|
||||
$hash->{SetFn} = "Calendar_Set";
|
||||
$hash->{AttrFn} = "Calendar_Attr";
|
||||
$hash->{NotifyFn}= "Calendar_Notify";
|
||||
$hash->{AttrList}= "update:sync,async,none hideOlderThan hideLaterThan onCreateEvent SSLVerify:0,1 $readingFnAttributes";
|
||||
$hash->{AttrList}= "update:sync,async,none removevcalendar:0,1 hideOlderThan hideLaterThan onCreateEvent SSLVerify:0,1 $readingFnAttributes";
|
||||
}
|
||||
|
||||
|
||||
@ -2224,8 +2224,9 @@ sub Calendar_Cleanup($) {
|
||||
delete($hash->{".fhem"}{removeall});
|
||||
delete($hash->{".fhem"}{serialized});
|
||||
delete($hash->{".fhem"}{subprocess});
|
||||
|
||||
|
||||
my $name= $hash->{NAME};
|
||||
delete($hash->{".fhem"}{iCalendar}) if(AttrVal($name,"removevcalendar",0));
|
||||
Log3 $hash, 4, "Calendar $name: process ended.";
|
||||
}
|
||||
|
||||
@ -2436,7 +2437,11 @@ sub Calendar_UpdateCalendar($$) {
|
||||
}
|
||||
|
||||
foreach my $v (grep { $_->{type} eq "VEVENT" } @{$root->{entries}}) {
|
||||
#main::Debug "Merging " . $v->asString();
|
||||
|
||||
# totally skip outdated calendar entries
|
||||
next if ($v->tm($v->value("DTEND")) < time() && $v->valueOrDefault("RRULE", "") eq "");
|
||||
|
||||
#main::Debug "Merging " . $v->asString();
|
||||
my $found= 0;
|
||||
my $added= 0; # flag to prevent multiple additions
|
||||
$n++;
|
||||
@ -2880,7 +2885,12 @@ sub CalendarAsHtml($;$) {
|
||||
background and FHEM will not block during updates. If this attribute is set to
|
||||
<code>none</code>, the calendar will not be updated at all.
|
||||
</li><p>
|
||||
|
||||
|
||||
<li><code>removevcalendar 0|1</code><br>
|
||||
If this attribute is set to 1, the vCalendar will be discarded after the processing to reduce the memory consumption of the module.
|
||||
A retrieval via <code>get <name> vcalendar</code> is then no longer possible.
|
||||
</li><p>
|
||||
|
||||
<li><code>hideOlderThan <timespec></code><br>
|
||||
<code>hideLaterThan <timespec></code><br><p>
|
||||
|
||||
@ -3274,7 +3284,13 @@ sub CalendarAsHtml($;$) {
|
||||
nicht blockieren. Wenn dieses Attribut auf <code>none</code> gesetzt ist, wird der
|
||||
Kalender überhaupt nicht aktualisiert.
|
||||
</li><p>
|
||||
|
||||
|
||||
<li><code>removevcalendar 0|1</code><br>
|
||||
Wenn dieses Attribut auf 1 gesetzt ist, wird der vCalendar nach der Verarbeitung verworfen,
|
||||
gleichzeitig reduziert sich der Speicherverbrauch des Moduls.
|
||||
Ein Abruf über <code>get <name> vcalendar</code> ist dann nicht mehr möglich.
|
||||
</li><p>
|
||||
|
||||
<li><code>hideOlderThan <timespec></code><br>
|
||||
<code>hideLaterThan <timespec></code><br><p>
|
||||
|
||||
@ -3308,7 +3324,7 @@ sub CalendarAsHtml($;$) {
|
||||
|
||||
<li><code>SSLVerify</code><br>
|
||||
|
||||
Dieses Attribut setzt die Art der Überpruuml;fung des Zertifikats des Partners
|
||||
Dieses Attribut setzt die Art der Überprüfung des Zertifikats des Partners
|
||||
bei mit SSL gesicherten Verbindungen. Entweder auf 0 setzen für
|
||||
SSL_VERIFY_NONE (keine Überprüfung des Zertifikats) oder auf 1 für
|
||||
SSL_VERIFY_PEER (Überprüfung des Zertifikats). Die Überprüfung auszuschalten
|
||||
|
Loading…
Reference in New Issue
Block a user