Sunday, 15 June 2014

c# - Avoid UI Lockups when doing lots of PropertyUpdates -


You are trying to find the best way to avoid UI-lockpages when you have a lot of updates Are doing so.

The basic premise is that at the start of my device a strong FSTAT runs within a background employee, resulting in a large list of files and their information. Once this is complete, in my runawakker's compounded function, I again broadcast this information in the UI inside TreeView.

However, this includes lots of asset updates! Depending on the number of files which can be 5000+ files for its promotion, it completely locks the UI for about 3-5 seconds.

I was thinking that I can update the UI asynchronously, as I say, promote 10-20 files at a time & amp; However, continue to update the UI thread so that its still sensitive.

Thank you.

If you are updating information inside TreeView using property bindings, then you can set your bindings. You can set the flag on the right. If you are not updating the values ​​using bindings, then it may be something to see.

Another option would be to update all your properties, but for the property (assuming you are using your bindings to update) when All your data will not change, and then call the contact program on the task for each of your properties, it is still uneven, but it should not be 5000+ binding updates, take 3-5 seconds.


No comments:

Post a Comment