Renderer process priority

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Renderer process priority

Postby joelhnatow » Thu May 12, 2016 8:02 am

Hi,

In my Windows application I'm spawning a separate sub-process for the CEF renderer. I'm trying to keep this sub-process running as a "Below Normal" priority class. The machine this application is running on is CPU constrained and I need to make sure the CEF / browser portion of things doesn't starve CPU cycles from the other processes running on this machine. I can set the process priority initially to Below Normal in my CEF renderer exe, but I noticed that it seems like somewhere under the hood this priority can be changed back to Normal. For instance, if I select an HTML drop down in the browser, the process is reverted back to Normal priority. Is there any way to prevent this process priority change from within CEF or is this within the Chromium guts?

Thanks!

Joel
joelhnatow
Newbie
 
Posts: 6
Joined: Wed Apr 01, 2015 3:24 pm

Re: Renderer process priority

Postby magreenblatt » Thu May 12, 2016 8:10 am

It would be within Chromium.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Renderer process priority

Postby joelhnatow » Thu May 12, 2016 8:18 am

OK, that's what I assumed. Thank you for the quick response and a great piece of software!
joelhnatow
Newbie
 
Posts: 6
Joined: Wed Apr 01, 2015 3:24 pm

Re: Renderer process priority

Postby HarmlessDave » Fri May 13, 2016 1:47 pm

You might have already thought of this, but you could try using CEF render process events like OnBeforeNavigation to drop the priority back down again. If you can map out everything that is raising the priority you could optimize this to only lower the priority after you know it has been raised.

Another approach would be to find all the thread priority calls in the chromium code and comment them out. You'd probably need to re-do this every time you updated the source.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 103 guests