]> granicus.if.org Git - esp-idf/commitdiff
Fix the console performance issue
authorRoland Dobai <dobai.roland@gmail.com>
Wed, 13 Jun 2018 05:48:52 +0000 (07:48 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Wed, 13 Jun 2018 06:05:31 +0000 (08:05 +0200)
The IDF monitor waits for one second before printing the last
unterminated line. This is necessary for the correct filtering.
However, this causes poor performance, for example, in the case of the
system/console example.

This fix reduces the waiting time which improves the response time of
the console example and doesn't seem to influence the monitor filter.

Closes https://github.com/espressif/esp-idf/issues/2054

tools/idf_monitor.py

index 5c474ad4b6b02f1ecbbfd44f5d40cb6436c50c10..1e76d4372dc92b41eda447a7be146bd19e435b05 100755 (executable)
@@ -333,7 +333,7 @@ class Monitor(object):
                     self.handle_serial_input(data)
                     if self._invoke_processing_last_line_timer is not None:
                         self._invoke_processing_last_line_timer.cancel()
-                    self._invoke_processing_last_line_timer = threading.Timer(1, self.invoke_processing_last_line)
+                    self._invoke_processing_last_line_timer = threading.Timer(0.1, self.invoke_processing_last_line)
                     self._invoke_processing_last_line_timer.start()
                     # If no futher data is received in the next short period
                     # of time then the _invoke_processing_last_line_timer