Render process grouping based on a query parameter

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

Render process grouping based on a query parameter

Postby aneeshm » Thu Nov 24, 2016 4:48 am

Hi All,

We are using CEF inside our web authoring tool for Live Preview of the document contents. We create one CEF instance per document. With the multi process model, CEF creates a render process for each document opened. So when the user opens a good number of documents, then the memory consumption is going up with every new Render process. We would like to have a less number of Render processes.

There is a command line flag in Chromium to group processes based on site. But this will not be useful for us as all the documents we preview are local files (file://). Hence we are looking at some other method for grouping processes. One method we tried is to use a query parameter (eg: file://path?group=true) to convey that this CEF instance should be included in the process group. We have made an experimental Chromium/Blink patch also to make this work. How useful will this be for others?

/- Aneesh
aneeshm
Newbie
 
Posts: 2
Joined: Fri Feb 19, 2016 1:43 am

Re: Render process grouping based on a query parameter

Postby Czarek » Thu Nov 24, 2016 5:37 am

How about using --process-per-site along with a custom scheme handler to access local files?

EDIT: Or handling special domain like "http://file.system/c/Windows/some.txt" using CefRequestHandler::GetResourceHandler?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. I'm available for contract work, see my resume.
User avatar
Czarek
Virtuoso
 
Posts: 1829
Joined: Sun Nov 06, 2011 2:12 am

Re: Render process grouping based on a query parameter

Postby magreenblatt » Thu Nov 24, 2016 1:36 pm

What do you mean by "CEF instance" per document?

If you are creating separate CefBrowsers then they should share the same renderer process if you do the following:

1. Create all CefBrowsers with the same (or NULL) CefRequestContext.
2. Load all URLs from the same origin. Use a custom scheme handler instead of the file scheme.
magreenblatt
Site Admin
 
Posts: 9848
Joined: Fri May 29, 2009 6:57 pm


Return to Feature Request Forum

Who is online

Users browsing this forum: No registered users and 1 guest