commit 737c26c2fbc8bcfbb21c02db17a87dd082552ba9 Author: Damian Johnson atagar@torproject.org Date: Sat Aug 19 04:43:13 2017 -0700
Don't clear screen in main draw loop
To avoid screen hiccups from persisting we cleared the screen on every redraw...
https://trac.torproject.org/projects/tor/ticket/2830
This seemed fine on my laptop since I wasn't running a real relay, but under actual load it causes nyx to flicker annoyingly every few seconds. This was a hack in case of anomalies. Cure was worse than the disease.
We might need to revisit this (... again), but for now this makes the experience of running nyx on my relay much nicer. --- nyx/__init__.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/nyx/__init__.py b/nyx/__init__.py index bb1d074..5cd4a22 100644 --- a/nyx/__init__.py +++ b/nyx/__init__.py @@ -432,23 +432,15 @@ class Interface(object): for panel in self.page_panels(): panel.redraw()
- def redraw(self, force = True): + def redraw(self): """ Renders our displayed content. - - :param bool force: if **False** only redraws content if resized """
- # Curses may overly cache content without clearing here... - # https://trac.torproject.org/projects/tor/ticket/2830#comment:9 - - if force: - nyx.curses.clear() - occupied = 0
for panel in self.page_panels(): - panel.redraw(force = force, top = occupied) + panel.redraw(force = False, top = occupied) occupied += panel.get_height()
def quit(self):
tor-commits@lists.torproject.org