mirror of
https://github.com/whoswhip/Spectrum.git
synced 2026-12-06 01:28:42 +00:00
fix(logs): optimize log entry retrieval
Refactor the log entry retrieval in Renderer.cs to use the LogManager's LogEntries collection directly instead of converting it to a list. This change improves performance by reducing overhead, especially for larger collections.
This commit is contained in:
@@ -378,7 +378,7 @@ namespace Spectrum
|
|||||||
|
|
||||||
ImGui.BeginChild("Logs", new Vector2(0, -34), ImGuiChildFlags.AlwaysUseWindowPadding);
|
ImGui.BeginChild("Logs", new Vector2(0, -34), ImGuiChildFlags.AlwaysUseWindowPadding);
|
||||||
|
|
||||||
var _LogEntries = LogManager.LogEntries.ToList();
|
var _LogEntries = LogManager.LogEntries;
|
||||||
foreach (var log in _LogEntries)
|
foreach (var log in _LogEntries)
|
||||||
{
|
{
|
||||||
ImGui.Text(log.ToString());
|
ImGui.Text(log.ToString());
|
||||||
|
|||||||
Reference in New Issue
Block a user