diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-07-30 22:56:43 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-07-30 22:56:43 +0000 |
| commit | 1557c715e461d5a7deb04bb008c6497441351bbe (patch) | |
| tree | 8a378b20ca3bebab0b2eca1742c10dfd746cb2a1 /lib/python/Components/Sources/CurrentService.py | |
| parent | b8783e5b26a7dd0601bece623c4cbfe19f57977b (diff) | |
| download | enigma2-1557c715e461d5a7deb04bb008c6497441351bbe.tar.gz enigma2-1557c715e461d5a7deb04bb008c6497441351bbe.zip | |
some minor speedups using caches and more selective updating
Diffstat (limited to 'lib/python/Components/Sources/CurrentService.py')
| -rw-r--r-- | lib/python/Components/Sources/CurrentService.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/python/Components/Sources/CurrentService.py b/lib/python/Components/Sources/CurrentService.py index 100822bc..08d67eee 100644 --- a/lib/python/Components/Sources/CurrentService.py +++ b/lib/python/Components/Sources/CurrentService.py @@ -2,6 +2,8 @@ from Components.PerServiceDisplay import PerServiceBase from enigma import iPlayableService from Source import Source +from time import time + class CurrentService(PerServiceBase, Source): def __init__(self, navcore): Source.__init__(self) @@ -18,9 +20,11 @@ class CurrentService(PerServiceBase, Source): self.navcore = navcore def serviceEvent(self, event): - self.changed(event) + self.changed((self.CHANGED_SPECIFIC, event)) def getCurrentService(self): - return self.navcore.getCurrentService() + if self.cache is None: + self.cache = self.navcore.getCurrentService() + return self.cache service = property(getCurrentService) |
