Reducing number of helper processes

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.

Reducing number of helper processes

Postby lavv17 » Wed Jul 11, 2018 9:16 am

Hello!

My application creates multiple browsers with the same site (protocol, domain, port). Each browser seems to create a helper process. I have tried options process-per-site and process-per-tab, but the number of helpers is the same.

Is there any way to force a single helper for the site?
lavv17
Techie
 
Posts: 23
Joined: Tue May 22, 2018 8:50 am

Re: Reducing number of helper processes

Postby ndesktop » Wed Jul 11, 2018 9:37 am

There is also --site-per-process to use.
Also --process-per-site-instance.
I didn't experimented with all of them myself.
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am

Re: Reducing number of helper processes

Postby lavv17 » Fri Jul 13, 2018 9:01 am

site-per-process and process-per-site-instance make no difference.

I think those browsers should be somehow linked with each other to share the helper, but how?
lavv17
Techie
 
Posts: 23
Joined: Tue May 22, 2018 8:50 am

Re: Reducing number of helper processes

Postby lavv17 » Fri Jul 13, 2018 9:06 am

My fault. http://magpcss.org/ceforum/apidocs3/projects/(default)/CefRequestContext.html says "Browser objects with different request contexts will never be hosted in the same render process" and it's my case :(
lavv17
Techie
 
Posts: 23
Joined: Tue May 22, 2018 8:50 am

Re: Reducing number of helper processes

Postby lavv17 » Mon Jul 16, 2018 1:56 am

Is it possible to have different cookie managers in the same request context?
lavv17
Techie
 
Posts: 23
Joined: Tue May 22, 2018 8:50 am

Re: Reducing number of helper processes

Postby magreenblatt » Mon Jul 16, 2018 10:30 am

lavv17 wrote:Is it possible to have different cookie managers in the same request context?

Yes, use the CreateContext variant that takes another CefRequestContext as the first argument.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: Reducing number of helper processes

Postby lavv17 » Wed Jul 18, 2018 3:02 am

Here is what I do:
Code: Select all
CefRequestContext::CreateContext( CefRequestContext::GetGlobalContext(), this );
(and this implements CefRequestContextHandler with GetCookieManager method).
But still each browser gets a separate helper process.
lavv17
Techie
 
Posts: 23
Joined: Tue May 22, 2018 8:50 am


Return to Support Forum

Who is online

Users browsing this forum: NateAtReach and 40 guests