Monday, August 16, 2010

DataView RowFilter performance

I needed to use DataView but the performance I got was very poor. Searching the web I found this resource which explains the root cause for this issue: after each RowFilter the DataView is re-indexed.

Searching a bit more yield the answer from Microsoft: don't use RowFilter if you don't have to. Use FindRows.

For my scenario, using FindRows instead of Row filter resulted in at least factor of 6 improvement (i.e. 1 second instead of 6).

No comments: