Elmish.WPF icon indicating copy to clipboard operation
Elmish.WPF copied to clipboard

Make use of ObservableCollection.AddRange (when it exists)

Open TysonMN opened this issue 5 years ago • 2 comments

ObservableCollection does not currently have bulk add support, but Microsoft plans to add it. We could make some minor improvements with this.

Current milestone is .NET 5. On the other hand, the issue was created almost four years ago.

Other than implementing this ourselves (which I don't want to do atm), we must wait until this has been released. In the meantime, I don't mind closing this issue.

TysonMN avatar May 20 '20 21:05 TysonMN

Good call. But if only available in .NET 5, I guess we need to multitarget and do some conditional compilation.

In the meantime, I don't mind closing this issue.

Your call, it's all the same to me. :)

cmeeren avatar May 21 '20 06:05 cmeeren

So definitely not trying to hijack this thread, but for anyone who's in immediate need of this for production code, there is an alternative in DynamicData's SourceCache<T> (preferred) and SourceList<T>.

If you expect the performance improvement to be significant maybe considering some objects from ReactiveUI and DynamicData could help.

Evangelink avatar Aug 14 '21 17:08 Evangelink