From 3ece6dc27c3dab585e12ae5a3cfe58470009d050 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Thu, 4 Apr 2024 08:41:06 +0200 Subject: [PATCH] Do not incrementally update server logs (too costly) --- src/view/text_log_view.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/text_log_view.rs b/src/view/text_log_view.rs index 06662e5..c6648fe 100644 --- a/src/view/text_log_view.rs +++ b/src/view/text_log_view.rs @@ -43,7 +43,8 @@ impl TextLogView { // (but respect the FLUSH_INTERVAL_MILLISECONDS) let now = Local::now(); if max_query_end_microseconds.is_some() - && (now - max_query_end_microseconds.unwrap()) >= flush_interval_milliseconds + && ((now - max_query_end_microseconds.unwrap()) >= flush_interval_milliseconds + || query_ids.is_none()) { context .lock()