浏览代码

HUE-3922 [core] Truncate log buffer size to be more performant

Romain Rigaux 9 年之前
父节点
当前提交
a175e93
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/log/__init__.py

+ 1 - 1
desktop/core/src/desktop/log/__init__.py

@@ -190,7 +190,7 @@ def fancy_logging():
   """Configure logging into a buffer for /logs endpoint."""
   """Configure logging into a buffer for /logs endpoint."""
   from log_buffer import FixedBufferHandler
   from log_buffer import FixedBufferHandler
 
 
-  BUFFER_SIZE = 10 * 1024 * 1024 # This is the size in characters, not bytes
+  BUFFER_SIZE = 500 * 200 # This is the size in characters, not bytes. Targets about 500 rows.
   buffer_handler = FixedBufferHandler(BUFFER_SIZE)
   buffer_handler = FixedBufferHandler(BUFFER_SIZE)
   _formatter = formatter.Formatter(LOG_FORMAT, DATE_FORMAT)
   _formatter = formatter.Formatter(LOG_FORMAT, DATE_FORMAT)