diff --git a/ProcessDoctor.Backend.Windows/WmiProcessMonitor.cs b/ProcessDoctor.Backend.Windows/WmiProcessMonitor.cs index 4c40189..6ea34c2 100644 --- a/ProcessDoctor.Backend.Windows/WmiProcessMonitor.cs +++ b/ProcessDoctor.Backend.Windows/WmiProcessMonitor.cs @@ -18,7 +18,7 @@ public WmiProcessMonitor(Lifetime lifetime, ILog logger) "select * from __InstanceDeletionEvent within 1 where TargetInstance isa 'Win32_Process'", e => { - // TODO: Optimize this + // TODO[#5]: Optimize this var process = (ManagementBaseObject)e.NewEvent["TargetInstance"]; var processId = Convert.ToUInt32(process.Properties["ProcessID"].Value); lock (_locker) diff --git a/ProcessDoctor/ViewModels/ProcessTreeViewModel.cs b/ProcessDoctor/ViewModels/ProcessTreeViewModel.cs index 61da254..03c5b2b 100644 --- a/ProcessDoctor/ViewModels/ProcessTreeViewModel.cs +++ b/ProcessDoctor/ViewModels/ProcessTreeViewModel.cs @@ -12,7 +12,7 @@ namespace ProcessDoctor.ViewModels; -// TODO: optimize all IndexOf/RemoveAt/linear Remove calls in this class, perhaps by removing them +// TODO[#5]: optimize all IndexOf/RemoveAt/linear Remove calls in this class, perhaps by removing them public class ProcessTreeViewModel { private readonly ILog _logger; @@ -74,7 +74,7 @@ private void OnAdd(IEnumerable processes) ?? Array.Empty(); foreach (var child in children) { - // TODO: Optimize + // TODO[#5]: Optimize _viewModels.RemoveAt(_viewModels.IndexOf(child)); } _orphanedModels.Remove(process.Id);