Individual observable collections versus filtered observable collection performance

Which is faster for linking a large collection, for example,

Requirement - Ecommerce Application:

Price Blotter - displays quotes / deals for different securities, for example.

Master view . Displays all quotation marks.

Country type - displays quotes / deals for securities belonging to a specific country. For instance. UK / France etc.

Currently, we have an observable collection for each type, and when the price comes from the server, we send a copy to each Observable collection based on a filter, that is, one to represent the master, and, for example, based on the country for the country.

Question: The filtered observable collection surpasses this model, although CollectionViewsource will require updating when adding / removing prices. Updates the source of the CollectionView, adds any performance limitation.

The example above is for reference only, there can be up to 20 different types and up to 20-50K, with 5-6K unique prices, each of which has a very large depth of price within a day. The application is in high demand in terms of GUI performance.

I plan to replace the current Datagrid with a lightweight table, wondering if one collective Observable collection will help.

Thanks so much for your submissions.

+6
source share
1 answer

Updates to CollectionViewSource can be very poor for performance, as this will cause the item and item containers in your view to be restored (see the link in the following sentence for reference). This is the reason why WPF has Editable Collections . I implemented large modifiable collections for the product once, and I never encountered performance issues when using IEditableCollectionView , although this does not mean that it may not be fast enough for your application.

I assume that if you use IEditableCollectionView , it doesn’t really matter if you split the collections up or put them all together in one giant collection using different filters.

0
source

Source: https://habr.com/ru/post/988846/


All Articles