main_menu and temp: reduce load
Drawing the graph has a high load impact, reduce the interval of redraw if the user needs instantaneous values, then the list provides it, the graph is there to provide historical data of behaviour not instantaneous values. -------- | Load | Note idle | 0.3 | screensaver menu | 0.4 | No process update extrude | 0.6 | updates temp graph 5s | 0.8 | graph 1s | 1.2 | the load is the 15 min mean after about half an hour Tests carried out on a Pi3A
This commit is contained in:
1 parent
046e03b883
commit
0d259d6d04
2 files changed
+4
-2
No files matched your search
+2
-1
@@ -48,7 +48,8 @@ class MainPanel(MenuPanel):
|
||||
|
||||
def activate(self):
|
||||
if self.graph_update is None:
|
||||
self.graph_update = GLib.timeout_add_seconds(1, self.update_graph)
|
||||
# This has a high impact on load
|
||||
self.graph_update = GLib.timeout_add_seconds(5, self.update_graph)
|
||||
return
|
||||
|
||||
def deactivate(self):
|
||||
|
||||
@@ -184,7 +184,8 @@ class TemperaturePanel(ScreenPanel):
|
||||
|
||||
def activate(self):
|
||||
if self.graph_update is None:
|
||||
self.graph_update = GLib.timeout_add_seconds(1, self.update_graph)
|
||||
# This has a high impact on load
|
||||
self.graph_update = GLib.timeout_add_seconds(5, self.update_graph)
|
||||
|
||||
def deactivate(self):
|
||||
if self.graph_update is not None:
|
||||
|
||||
Reference in new issue
Block a user