Closing Render Thread and JS Reg

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.

Closing Render Thread and JS Reg

Postby tslate » Sat Nov 11, 2017 9:33 am

Hi,

These questions are based on processing each page synchronously in turn, once processed not needed anymore. The behavior I noticed is when a domain is changed.

(1) As you know for every separate domain a new render thread is created.
How do I close each render thread when done in an app which may include many separate domains?

App is using own windows and messaging loops.

(2) WebKit init. I suppose it will follow the render thread but....

Behavior OnWebKitInitialized called once each time new render thread or domain switch.

Can the registration be once for the browser and all domains or is it per domain?

Thanks
Last edited by tslate on Mon Nov 13, 2017 6:33 am, edited 1 time in total.
tslate
Techie
 
Posts: 32
Joined: Wed Jul 19, 2017 12:47 pm

Re: Closing Render Thread and JS Reg

Postby magreenblatt » Sat Nov 11, 2017 9:49 pm

What OS and CEF version? Are you using single-process or multi-process mode?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Closing Render Thread and JS Reg

Postby tslate » Mon Nov 13, 2017 6:35 am

Dev specs:

CEF 3.3112.1657.g2c22842
Windows 7
VS 2017, C++
Not using CEF msg loop, own native.
Multi-process mode.
tslate
Techie
 
Posts: 32
Joined: Wed Jul 19, 2017 12:47 pm

Re: Closing Render Thread and JS Reg

Postby magreenblatt » Mon Nov 13, 2017 3:23 pm

Renderer processes will be created as described at https://www.chromium.org/developers/des ... ess-models. Note that only the default process model is supported by CEF (e.g. if you use a different process model there may be bugs).
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Closing Render Thread and JS Reg

Postby tslate » Tue Nov 14, 2017 7:44 am

Then to be clear out of the 4 process models CEF only supports the Process-per-site-instance model, correct?

So the answer for page unloading is that each URL for the same domain is then unloaded once another URL of the same domain is loaded, correct?

Thanks
tslate
Techie
 
Posts: 32
Joined: Wed Jul 19, 2017 12:47 pm

Re: Closing Render Thread and JS Reg

Postby magreenblatt » Tue Nov 14, 2017 11:24 am

tslate wrote:Then to be clear out of the 4 process models CEF only supports the Process-per-site-instance model, correct?

Yes.

tslate wrote:So the answer for page unloading is that each URL for the same domain is then unloaded once another URL of the same domain is loaded, correct?

What do you mean by "page unloading"?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Closing Render Thread and JS Reg

Postby tslate » Tue Nov 14, 2017 2:11 pm

Threads and memory allocated to that URL are destroyed. It seems they might just allocate/de-allocate everything based on internal algorithms rather than static calls at least from a cursory read of their process material, unsure. If the destruction is not explicit then I assume they garbage collect it based on usage.
tslate
Techie
 
Posts: 32
Joined: Wed Jul 19, 2017 12:47 pm

Re: Closing Render Thread and JS Reg

Postby magreenblatt » Tue Nov 14, 2017 2:19 pm

You're correct that the memory management scheme depends on the subsystem.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 34 guests