mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
xbmc: add PR2637
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
1f6d6dac80
commit
95c0a28bed
60
packages/mediacenter/xbmc/patches/12.1.6/xbmc-990.08-PR2637.patch
vendored
Normal file
60
packages/mediacenter/xbmc/patches/12.1.6/xbmc-990.08-PR2637.patch
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
From d4c34400b9bdebbb1a943603a54fdf207034ddd1 Mon Sep 17 00:00:00 2001
|
||||
From: Dag Wieers <dag@wieers.com>
|
||||
Date: Sat, 20 Apr 2013 02:59:47 +0200
|
||||
Subject: [PATCH] Increase USB and CEC rescan interval to 5 seconds
|
||||
|
||||
In one of my investigations to see why XBMC performance is so bad (even when idle) I found one of the threads (in my case PeripheralBusCEC) scan a big sysfs tree recursively. On the 1Ghz AppleTV 1 device this would be about 2% of the CPU *every* second. For the USB thread we luckily have Udev events, but for CEC it is using sysfs polling which is quite expensive. It would be better to make use of Udev as well for CEC (where available) however 5 seconds should be fine for everyone.
|
||||
|
||||
In my own builds I even brought it down to 30 seconds. Which means 29 seconds of reduced CPU usage.
|
||||
|
||||
The CEC polling probably should be more restricted to specific sysfs sections, or preferably use Udev as well, when available.
|
||||
|
||||
PS XBMC needs a special idle-state where it can turn down these expensive threads to make sure hardware can go into deeper sleep states. Especially for devices that doesn't do suspend for various reasons this is a requirement. (The ATV1 device for instance gets warm even when idle) If we can combine display-sleep with low-power states and a less expensive main-loop, that would be already quite an improvement without needing a complete refactoring of the code.
|
||||
---
|
||||
xbmc/peripherals/bus/PeripheralBus.cpp | 2 +-
|
||||
xbmc/peripherals/bus/PeripheralBus.h | 2 +-
|
||||
xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/bus/PeripheralBus.cpp b/xbmc/peripherals/bus/PeripheralBus.cpp
|
||||
index 0e673ee..f0219f1 100644
|
||||
--- a/xbmc/peripherals/bus/PeripheralBus.cpp
|
||||
+++ b/xbmc/peripherals/bus/PeripheralBus.cpp
|
||||
@@ -27,7 +27,7 @@
|
||||
using namespace std;
|
||||
using namespace PERIPHERALS;
|
||||
|
||||
-#define PERIPHERAL_DEFAULT_RESCAN_INTERVAL 1000
|
||||
+#define PERIPHERAL_DEFAULT_RESCAN_INTERVAL 5000
|
||||
|
||||
CPeripheralBus::CPeripheralBus(CPeripherals *manager, PeripheralBusType type) :
|
||||
CThread("PeripheralBus"),
|
||||
diff --git a/xbmc/peripherals/bus/PeripheralBus.h b/xbmc/peripherals/bus/PeripheralBus.h
|
||||
index cc368ac..24e1524 100644
|
||||
--- a/xbmc/peripherals/bus/PeripheralBus.h
|
||||
+++ b/xbmc/peripherals/bus/PeripheralBus.h
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/*!
|
||||
* @class CPeripheralBus
|
||||
- * This represents a bus on the system. By default, this bus instance will scan for changes every second.
|
||||
+ * This represents a bus on the system. By default, this bus instance will scan for changes every 5 seconds.
|
||||
* If this bus only has to be updated after a notification sent by the system, set m_bNeedsPolling to false
|
||||
* in the constructor, and implement the OnDeviceAdded(), OnDeviceChanged() and OnDeviceRemoved() methods.
|
||||
*
|
||||
diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
index da169c1..0db7423 100644
|
||||
--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
+++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
@@ -57,7 +57,7 @@ class PERIPHERALS::DllLibCEC : public DllDynamic, DllLibCECInterface
|
||||
m_dll(new DllLibCEC),
|
||||
m_cecAdapter(NULL)
|
||||
{
|
||||
- m_iRescanTime = 1000;
|
||||
+ m_iRescanTime = 5000;
|
||||
if (!m_dll->Load() || !m_dll->IsLoaded())
|
||||
{
|
||||
delete m_dll;
|
||||
--
|
||||
1.8.1.6
|
||||
|
Loading…
x
Reference in New Issue
Block a user