ProcessDoctor icon indicating copy to clipboard operation
ProcessDoctor copied to clipboard

Better data structure for the process tree

Open ForNeVeR opened this issue 1 year ago • 3 comments
trafficstars

Currently, we rely on a plain list ObservableCollection<ProcessModel> Processes model.

This is problematic in some ways.

  1. It's unclear how to efficiently find the process whenever we decide to delete it.
  2. It is unclear how to produce the tree structure from them.

Currently, I am thinking about declaring some sort of observable dictionary (is there such a class in BCL? if not, we could create our own).

Make sure to review and eliminate every instance of TODO[#5] in the application code.

ForNeVeR avatar Dec 24 '23 21:12 ForNeVeR

Is that implementation match to you want? https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.Core/Collections/ObservableDictionary.cs

Vazovsk1y avatar Dec 25 '23 16:12 Vazovsk1y

Yep, could be.

ForNeVeR avatar Dec 25 '23 17:12 ForNeVeR

If you are going to stick with ReactiveUI it is possible to use SourceCache from DynamicData package.

EDIT: I mean ReactiveUI already has reference to DynamicData so no new packages are needed

DmitryZhelnin avatar Mar 18 '24 09:03 DmitryZhelnin