Page 1 of 1
Fullscreen thread priority
Posted: Sun Aug 12, 2007 10:56 pm
by foxyshadis
Something weird I noticed while running a video encoder in the background: The teardown thread for the fullscreen, that runs when you double-click to exit back to the browsers, gets verrrrrry slow. I looked in process explorer and noticed it has thread priority 1! Normal is 8, and Low is 4, but even idle priority processes will steal cycles from the user interface in this instance. (My encoder can only run at low unless I force it, so it gets pretty painful.)
No other part of the UI has this problem, that I've seen so far.
Re: Fullscreen thread priority
Posted: Mon Aug 13, 2007 7:41 am
by xnview
foxyshadis wrote:Something weird I noticed while running a video encoder in the background: The teardown thread for the fullscreen, that runs when you double-click to exit back to the browsers, gets verrrrrry slow. I looked in process explorer and noticed it has thread priority 1! Normal is 8, and Low is 4, but even idle priority processes will steal cycles from the user interface in this instance. (My encoder can only run at low unless I force it, so it gets pretty painful.)
No other part of the UI has this problem, that I've seen so far.
Only when you exit fullscreen?
Posted: Mon Aug 13, 2007 8:08 am
by foxyshadis
I wasn't checking for it at the time, but I downloaded
wprime to totally load my cpu and found that it's actually the read-ahead cache. Disabled, it works fine (if slower) even in full-load conditions. However, it'll completely hang until the load is finished with read-ahead on, while it waits on processing the next image. Apparently the design of the cache locks the UI until it's done processing (?), which explains why it looked like it was happening when I tried to exit fullscreen.
I suppose a priority of 4-6 would make more sense, since it's a background task but one that's related to the UI, as opposed to something forgotten in the tray for hours like encoding.
Posted: Mon Aug 13, 2007 8:58 am
by xnview
foxyshadis wrote:
I suppose a priority of 4-6 would make more sense, since it's a background task but one that's related to the UI, as opposed to something forgotten in the tray for hours like encoding.
Where do you see that fullscreen thread has priority=1?
Posted: Mon Aug 13, 2007 10:49 am
by foxyshadis
This is a screen capture from process explorer, highlighting the thread that gets created and destroyed whenever the following image is being read:

At this point it had probably been open for 10 seconds, note that it's not really using any cpu time.
What I found most interesting, though, is that it doesn't do that in the viewer or the 'view' fullscreen, only the 'browser' fullscreen. the threads are created with normal priorities and exit quickly there.
Edit: I just noticed that stax just raised the same issue this weekend, I feel silly now. ^^;;