Can there be any performance benefit by implementing IList<T> with INotifyCollectionChanged

Emon Haque 3,176 Reputation points
2020-10-12T01:38:11.923+00:00

I've never implemented INotifyCollectionChanged before tonight and didn't event think about doing so. Here's how I did and in my case I only needed Add and Remove so I left all other unimplemented. For fair evaluation, I've created PDF document of 1133 pages several times with both ObservableCollection<T> and TestList<T>. With ObservableCollection<T> it takes about 302 seconds on average and with TestList<T>, 305 seconds.

Do programmers implement IList<T> with INotifyCollectionChanged for performance benefit or just to have a container with reduced functionality?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,691 questions
{count} votes