Исправление. Снижение производительности при большом количестве записей в журнале.

This commit is contained in:
sasha80
2025-09-20 13:23:05 +03:00
parent 647f1cf243
commit 0ad7cc6b3c
2 changed files with 7 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ signal handled()
Logger.ERROR: Color.RED,
Logger.FATAL: Color.RED,
}
@export var max_lines_count: int = 512
var _logger : Logger
@@ -75,3 +75,8 @@ func handle_message(message: Dictionary) -> void:
append_text(format(message) + '\n')
pop()
handled.emit()
var pc: = get_paragraph_count()
if pc < max_lines_count:
return
for i in pc - max_lines_count:
remove_paragraph(i)