Reducing CEF start-up time in embedded device

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 CEF start-up time in embedded device

Postby mikaeljohansson2 » Mon May 08, 2017 4:34 am

Hi,

I’m using CEF in an embedded device powered by an ARM dual-core CPU. I use HTML5 apps placed in the local device’s file system.

I would like to improve the start-up time of a CEF browser. Currently it takes appr. 2.5 seconds to start up a browser from call to CefBrowserHost::CreateBrowser() to callback to CefLoadHandler::OnLoadEnd().

Do you have any suggestions for settings such as command line parameters or build parameters to improve the start-up time for CEF? I have already experimented with the parameters "--no-proxy-server" and “--no-pings” when calling CefInitialize(), but that doesn’t reduce the start-up time in any significant way.

Best regards Mikael
mikaeljohansson2
Newbie
 
Posts: 5
Joined: Mon Jan 23, 2017 1:39 am

Re: Reducing CEF start-up time in embedded device

Postby magreenblatt » Mon May 08, 2017 12:40 pm

mikaeljohansson2 wrote:I use HTML5 apps placed in the local device’s file system.

How long does it take to load these HTML5 apps in Google Chrome on the same device?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Reducing CEF start-up time in embedded device

Postby mikaeljohansson2 » Wed May 10, 2017 11:07 am

Thanks for your answer, Marshall.

I managed to install Chrome, although of a slightly later version. It opened the same apps in approximately the same time, although I cannot measure it precisely.
Any tips on more accurate ways to measure?

I also have two more questions:
- There is a flag called “embedded” in the build setup for Chromium. Do you know if setting this flag will be helpful? Turning it on seems to create problems when building CEF, since it disables PDF and PPAPI, which seems needed by CEF.
- There is a Chromium build type called Official. Does CEF support that and would it make any relevant changes? I’m trying to build with it, but has so far not been successful.

For further information, I’m using CEF branch 2704. The Chrome build was 54.0.2810.2.
mikaeljohansson2
Newbie
 
Posts: 5
Joined: Mon Jan 23, 2017 1:39 am

Re: Reducing CEF start-up time in embedded device

Postby magreenblatt » Wed May 10, 2017 2:56 pm

mikaeljohansson2 wrote:I managed to install Chrome, although of a slightly later version. It opened the same apps in approximately the same time, although I cannot measure it precisely.

This means that the startup time is likely not something that you can improve by changing CEF/Chromium build flags.

mikaeljohansson2 wrote:Currently it takes appr. 2.5 seconds to start up a browser from call to CefBrowserHost::CreateBrowser() to callback to CefLoadHandler::OnLoadEnd().

How long does it take to load simple web content like an empty HTML page? That will tell you whether the delay is due to process startup time (to create the renderer process, load system libraries, etc), or whether the problem is due to your specific HTML5 application content.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Reducing CEF start-up time in embedded device

Postby Czarek » Thu May 11, 2017 12:24 am

mikaeljohansson2 wrote:- There is a Chromium build type called Official. Does CEF support that and would it make any relevant changes? I’m trying to build with it, but has so far not been successful.



See https://bitbucket.org/chromiumembedded/ ... igurations

Code: Select all
export GN_DEFINES="is_official_build=true
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Reducing CEF start-up time in embedded device

Postby mikaeljohansson2 » Thu May 11, 2017 8:17 am

Thanks for your answers, Marshall and Czarek,

Loading an empty HTML page takes appr. 0.7 seconds, so it actually seems to be my HTML5 apps that cause the long loading times. I will have to look into the apps themselves and try to improve them (they are quite CSS and JS heavy). I guess there are no command line or build parameters to improve the situation, just as you stated.

Regarding the Official build I was finally able to build it, but it seems it didn’t have any effect on the startup time.

Thanks a lot for your time and answers.
mikaeljohansson2
Newbie
 
Posts: 5
Joined: Mon Jan 23, 2017 1:39 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 46 guests