1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Core - Fixed very fast logging slowly taking up a lot of memory

Data model debug UI - Improved scrolling
This commit is contained in:
Robert 2021-04-23 09:19:25 +02:00
parent 1a82903449
commit d32ac329c8
2 changed files with 2 additions and 3 deletions

View File

@ -25,7 +25,7 @@ namespace Artemis.Core
internal static void Emit(LogEvent logEvent) internal static void Emit(LogEvent logEvent)
{ {
LinkedList.AddLast(logEvent); LinkedList.AddLast(logEvent);
if (LinkedList.Count > 500) while (LinkedList.Count > 500)
LinkedList.RemoveFirst(); LinkedList.RemoveFirst();
OnEventAdded(new LogEventEventArgs(logEvent)); OnEventAdded(new LogEventEventArgs(logEvent));

View File

@ -69,8 +69,7 @@
<TreeView Grid.Row="1" <TreeView Grid.Row="1"
ItemsSource="{Binding MainDataModel.Children}" ItemsSource="{Binding MainDataModel.Children}"
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.IsVirtualizing="True">
VirtualizingStackPanel.VirtualizationMode="Recycling">
<TreeView.Resources> <TreeView.Resources>
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource MaterialDesignTreeViewItem}"> <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource MaterialDesignTreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" /> <Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />