I have a launch dialog button which creates a view model of a window and bind it to the the window(it is having UI virutalization enabled). It takes only 1 second to launch the dialog at first click. But if I open the same dialog very frequently or back to back, it starts taking more time in populating the grid data source for next iteration. if I give some pause, then again open window, then it takes only approx 1 or 2 seconds.
for first time populating the item source it take only 1 second:
next time populating the item source it takes 2 second
next time populating the item source it takes 3 second
next time populating the item source it takes 6 second
next time populating the item source it takes 8 second
However, if I call GC.Collect() which is not recommended, then populating grid data source always takes approx 1 second. but calling of
cost me some time for every iteration.
I know calling
GC.Collect is not a good option. Can anybody suggest how can I boost my application performance.
I am more concerned about the user machine as my machine is with very good configuration whereas user machine may not so fast.