JCEF queries

Having problems with building or using the JCEF Java binding? Ask your questions here.

JCEF queries

Postby chandan » Thu Jul 02, 2020 11:29 am

Hi,

We are trying to replace JXBrowser with JCEF in our project. While doing the implementation I have come across couple of questions.

1. In windows 10 I have noticed that the following jcef_helper.exe processes are created when a browser UI is opened.
a) 1 GPU process
b) 2 utility processes
c) 2 renderer processes
Is this normal to have these many processes for a single browser UI? Can we control to minimize the number of process creation?

2) In our application we have a concept called "session" where a session is represented by a JFrame. Within that frame we can have multiple other frames, modals etc. For a single session one sinle instance of cefBrowser will be created. For a different session another different cefBrowser will be created. But, all the UIs(modals, frames, tabs etc) will use the single browser. For every session, we are maintaining it's individual cefClient, instead of maintaining a single cefClient for all the sessions. Is this a valid design? is this recommended by JCEF?

3) are the APIs thread safe. For example loadUrl?

Thanks
Chandan
chandan
Techie
 
Posts: 10
Joined: Wed May 27, 2020 4:41 am

Re: JCEF queries

Postby magreenblatt » Thu Jul 02, 2020 11:38 am

#1: Yes, that is normal. You can try some of the flags from here but they are not tested/supported with CEF.

#2: You will need to create a separate CefBrowser (and different CefRequestContext) if you require separate storage (cache, cookies, etc). Otherwise, design the web app to track session state itself so you can reset it when desired. Once a CefBrowser is created you cannot change the associated CefClient. However, your CefClient implementation can delegate to other classes, etc.

#3: APIs are thread safe (or not) as documented.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 42 guests

cron