I have an app where such activities that are not likely to end quickly, run on background background For example, my There is some item to display, from where I show a generic icon to start, while the background code tries to see if there is a related image that should be displayed instead.
When the image tries to get XAML, if I do not already have it, then I add the query to the queue for processing later and temporarily return to the empty space I am Q Handling basically does this:
- Get a Mute X (so that I can manipulate an item safely)
- If the item is already queued
- Release the mute x
the queue, if not the queue is already running, then start it
objectFileQueueRunning = true; CTS = new cancellation TokenSaur (); Work.Run ((= =) Process Object file keys (CTS token));
The queue code basically keeps the top items from the list, and the process is done until we exit the items or the cancellation token is set. The same mutics are used within the line of the queue, but only when the top item is removed from the list and when objectFileQueueRunning is reset to false.
My problem is that the UI thread is basically unresponsive until the Qi code is over. .. although it's running on the background thread.
I have run a performance analysis on the performance app, but nothing can do that which could indicate to me what signals I get.
Do I need to pause the background thread in order to give UI thread a chance to interact with the user? Is it the case that I'm working so hard on the background thread that I do not see the UI thread?
Solution, in my case anyway, use the stackpayel as the item panel template background Lots of threads are working.
The problem with using the stackpayel is that it causes the virtualization to become inactive, which means that all the elements are created at one time.
Switching to itemWrgrid allows Gridwoo to use virtualization and therefore only create elements that are visible or visible, in turn, the reason for reducing background workload Is formed.
The reason for this is that I was using stackpayell when my app was first written for Windows 8.0 Problems arise when using default settings when users scroll horizontally because the scroll bar sizes vary, it seems that was fixed in Windows 8.1 but as I updated the app, I returned the XAMML Did not think again from.
Anyone else has to face similar problems.
No comments:
Post a Comment