mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
FRAMEBUFFER performance optimization
don't close the pipe to fbvs immediately as this waits for the child process to finish git-svn-id: https://svn.fhem.de/fhem/trunk@6015 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8f6a02ccd0
commit
303330138e
@ -126,6 +126,11 @@ sub FRAMEBUFFER_updateDisplay($) {
|
|||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $fbv = '/usr/local/bin/fbvs';
|
my $fbv = '/usr/local/bin/fbvs';
|
||||||
|
my $fd = $hash->{fd};
|
||||||
|
|
||||||
|
if (defined $fd) {
|
||||||
|
close $fd;
|
||||||
|
}
|
||||||
|
|
||||||
if (-x $fbv) {
|
if (-x $fbv) {
|
||||||
if (defined $hash->{debugFile}) {
|
if (defined $hash->{debugFile}) {
|
||||||
@ -138,10 +143,12 @@ sub FRAMEBUFFER_updateDisplay($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (FRAMEBUFFER_readLayout($hash)) {
|
if (FRAMEBUFFER_readLayout($hash)) {
|
||||||
open(FBV, "|".$fbv . ' -d '. $hash->{fhem}{fb_device});
|
open($fd, "|".$fbv . ' -d '. $hash->{fhem}{fb_device});
|
||||||
binmode FBV;
|
binmode $fd;
|
||||||
print FBV FRAMEBUFFER_returnPNG($name);
|
print $fd FRAMEBUFFER_returnPNG($name);
|
||||||
close FBV;
|
# don't close the file immediately, as this will wait
|
||||||
|
# for the fbv process to terminate which may take some time
|
||||||
|
#close FBV;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log3 $name, 1, "$fbv doesn't exist or isn't executable, please install it";
|
Log3 $name, 1, "$fbv doesn't exist or isn't executable, please install it";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user