Comparing performance of Chrome and CEF

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Comparing performance of Chrome and CEF

Postby pjackson » Thu Dec 02, 2010 9:42 pm

I'm wanting to push Chromium to the limit to see how it performs.

I created an animation using canvas:
http://dl.dropbox.com/u/9193041/layers.html

chrome.PNG
chrome.PNG (81.41 KiB) Viewed 15676 times

cefclient.PNG
cefclient.PNG (61.05 KiB) Viewed 15678 times


Does anyone have any theories as to why performance is better in Chrome?
The first idea that came into my head was that it had to do with thread contention between the CEF and main thread. I'm guessing that Windows has to internally lock the parent window before the child can be painted to it. Chrome wouldn't have this issue because the rendering is done in separate processes, so the window resources aren't shared.
Just a theory, but maybe someone more familiar with the code would have a better idea.

Cheers
Philip
pjackson
Newbie
 
Posts: 8
Joined: Thu Dec 02, 2010 7:48 pm

Re: Comparing performance of Chrome and CEF

Postby magreenblatt » Fri Dec 03, 2010 10:14 am

What revision of CEF are you using? What revision of Chromium are you using?

Are accelerated 2d canvas and accelerated compositing enabled in CEF? They're enabled by default starting in revision 149 and should provide performance improvements.

The GL implementation used to implement acceleration is configurable in Chromium. The current HEAD revision of CEF uses the desktop GL implementation whereas Chromium uses the Angle library implementation. Even when using the same underlying GL implementation the code path is still significantly different between CEF and Chromium. CEF uses the Chromium WebKit API implementation whereas Chromium uses its own multi-process implementation. The test_shell application has an architecture closer to CEF's and would provide a better basis for comparison. The following issue has more information: http://code.google.com/p/chromiumembedd ... ail?id=136

To understand what impact, if any, the CEF architecture has on performance you should compare against the associated Chromium revision. The below run modes will provide a more apples-to-apples performance comparison.

1) Chromium running with "--single-process --in-process-webgl --use-gl=desktop" flags.
2) test_shell running with "--enable-accelerated-compositing --enable-accelerated-2d-canvas --use-gl=desktop" flags.

Regards,
Marshall
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Comparing performance of Chrome and CEF

Postby pjackson » Sun Dec 05, 2010 7:25 pm

Thanks for the tip about using test_shell, it matched cef_client in performance as you predicted.

Disabling the "accelerated 2d canvas" seems to improve the performance of my example. With the option disabled, both test_shell and cef_client match Chrome in performance. Great news :D

I am curious about what this flag is actually doing; I couldn't find anything about an accelerated 2d canvas on chromium.org
pjackson
Newbie
 
Posts: 8
Joined: Thu Dec 02, 2010 7:48 pm

Re: Comparing performance of Chrome and CEF

Postby szanto90balazs » Tue Jul 08, 2014 11:47 am

I've experienced the same with disabling "accelerated 2d canvas". Anybody knows what could be the reason behind it?
szanto90balazs
Newbie
 
Posts: 4
Joined: Tue Jul 08, 2014 11:44 am

Re: Comparing performance of Chrome and CEF

Postby magreenblatt » Wed Jul 09, 2014 9:57 am

szanto90balazs wrote:I've experienced the same with disabling "accelerated 2d canvas". Anybody knows what could be the reason behind it?

The thread you're posting on is quite old. What CEF version are you using?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 43 guests