Slow loading CEF due to CefIntialize, CreateBrowser on Mac

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.

Slow loading CEF due to CefIntialize, CreateBrowser on Mac

Postby asrawat » Fri Mar 19, 2021 11:19 am

We are exploring Chromium Embedded Framework (CEF) as a main UI engine for out App. We have hit a roadblock in this on Mac. On Mac we are observing that CEFInitialize call and CreateBrowser is taking significant time (around 350-450ms and 250-300ms resp.). This is causing lag in loading of UI of our App on Mac. We also observed that warm launch time for these calls is very less on Win 10(close to 80ms and 100ms). Is this expected? And how can we optimize these calls on Mac?
We are using CEF branch 4324 and machine config iMac 2019 i5
asrawat
Newbie
 
Posts: 2
Joined: Fri Mar 19, 2021 9:54 am

Re: Slow loading CEF due to CefIntialize, CreateBrowser on M

Postby magreenblatt » Fri Mar 19, 2021 11:52 am

Are you testing with official Release builds from here? Are you seeing a similar lag with the provided "Sample Application"? Is the hardware equivalent between your Mac and Windows tests (e.g. similar processor, memory, disk speed)?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Slow loading CEF due to CefIntialize, CreateBrowser on M

Postby asrawat » Mon Mar 22, 2021 11:19 am

Thanks magreenblatt for your reply.
We are building CEF from branch 4324 as we have some custom changes that should not affect the launch time. cefclient app is loading quite fast. And hardware specs Windows - (Win10, i7 8700, 16GB, HDD) and iMac - (Mojave, i5, 32GB, Flash storage).
I would like to update below numbers for Mac. It is 200-300ms for CefIntialize and 200-300ms for CreateBrowser (this is the time between CreateBrowser call and OnBrowserCreated callback).
My main concern is why so much time difference between Mac and Win. Is this expected? And are there ways to optimize it further on Mac?
We are using off screen rendering on Win and Mac.
Please let me know if you need more info.
asrawat
Newbie
 
Posts: 2
Joined: Fri Mar 19, 2021 9:54 am

Re: Slow loading CEF due to CefIntialize, CreateBrowser on M

Postby sirheroics » Mon Mar 29, 2021 7:51 pm

I only have anecdotal data to add at the moment but I'm running on mac with off-screen rendering and I do notice a large pause when the browser's initialized as well. My app's running in debug though. In the next day or so I can try it in release and see if it matters.

The CEF framework I'm using is in release however.
sirheroics
Techie
 
Posts: 33
Joined: Mon Mar 22, 2021 6:32 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 26 guests