Problem with slow OSR on OS X

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.

Problem with slow OSR on OS X

Postby haakonn » Mon Dec 01, 2014 2:17 am

Hi,

I have used CEF branch 2062 successfully on Linux to generate off screen framebuffer that supports WebGL and all that great stuff.
Performance is great! :D

But I tried to move my source over to OS X now, and my two main problems is that "OnContextCreated" is never called. So my "JS injection" is never run. And performance is really slow. Less than 10 frames per second. I have tested cefclient example with off screen rendering, and it receives great framerate. So it is definatly some problem with my usage of CEF, or compiling of my application.

I have created the main process, and also generated two helper apps called myapp EH.app, and myapp NP.app, and I can see that at least the EH app is executed successfully. So this seems to work correct.
But I am unsure if my "GetRenderProcessHandler" is even called. I tried debugging using printf(), and it does not output anything. Is stdout redirected in the thread calling getrenderprocesshandler? If not, this could be one of the causes of why oncontextcreated is never called.

What more changes than adding the helper applications is needed when moving from Linux to OS X? I have tried comparing my code to the cefclient application, but all the delegate wrapping/abstraction is making it hard to follow.

The main difference with my application to cefclient is that I have no NSWindow handle to any window. Is this needed in OS X for off-screen rendering to work? I tried to comment out those parts in cefclient, and it seems to be unaffected in performance.

I implement the bare minimum, as I only need it to render to the framebuffer. All my input is via websockets. I have implemented a class which subclasses CefApp, CefRenderProcessHandler, CefV8Handler. Also a class which subclasses CefRenderHandler and CefDisplayHandler.

Any ideas? Have I fallen into a well known pitfall, or is this something that needs heavy debugging?

Comparing my threads to cefclient, I seem to lack a CVDisplayLink thread. Which sounds like something I would want to have ;P

In advance, thanks for any help at all. Any help at all is highly appreciated!
haakonn
Newbie
 
Posts: 8
Joined: Mon Dec 01, 2014 1:50 am

Re: Problem with slow OSR on OS X

Postby haakonn » Mon Dec 01, 2014 3:28 am

Ok,

So I found the source of why OnContextCreated wasn't executed. I forgot to give the "CefApp" reference to CefExecuteProcess. :oops:

But the slow framerate is still a problem.. :(
haakonn
Newbie
 
Posts: 8
Joined: Mon Dec 01, 2014 1:50 am

Re: Problem with slow OSR on OS X

Postby magreenblatt » Mon Dec 01, 2014 3:43 am

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

Re: Problem with slow OSR on OS X

Postby haakonn » Mon Dec 01, 2014 4:51 am

But cefclient works fine? Shouldn't that also be affected? I am using the same libcef_dll binary.
haakonn
Newbie
 
Posts: 8
Joined: Mon Dec 01, 2014 1:50 am

Re: Problem with slow OSR on OS X

Postby magreenblatt » Mon Dec 01, 2014 5:04 am

Did you download a pre-build cefclient from cefbuilds.com or did you build it yourself using the binary distribution? If you built it yourself what XCode version and target SDK did you use? The pre-built versions work fine because they're built against older versions of the OS X SDK.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Problem with slow OSR on OS X

Postby haakonn » Mon Dec 01, 2014 5:19 am

magreenblatt wrote:Did you download a pre-build cefclient from cefbuilds.com or did you build it yourself using the binary distribution? If you built it yourself what XCode version and target SDK did you use? The pre-built versions work fine because they're built against older versions of the OS X SDK.


I'm using cef_binary_3.2062.1914_macosx64. But i compiled cefclient with xcode. So xcode compiles libcef_dll and cefclient from bottom up. Using the prebuilt CEF framework binaries. And I compile my application the same way, using the same libcef and framework.

I have tried compiling everything with OS X SDK 10.8 and 10.9, but experience no difference in either my application or cefclient.
haakonn
Newbie
 
Posts: 8
Joined: Mon Dec 01, 2014 1:50 am

Re: Problem with slow OSR on OS X

Postby haakonn » Mon Dec 01, 2014 5:46 am

Even though I got the OnContextCreated part to work. So the JS part works. I still don't have that CVDisplayLink thread. Should that be alarming? Or is this a cocoa thread, that only appears if you have some kind of gui?
haakonn
Newbie
 
Posts: 8
Joined: Mon Dec 01, 2014 1:50 am

Re: Problem with slow OSR on OS X

Postby haakonn » Mon Dec 08, 2014 12:46 am

Hi,

To compile in XCode, I made a new project, and copied compiler options from the cefclient project. Could there be any special flags generated by the gyp system, that I have been unable to manually implement in the project details, that makes the project compile in some bad fasion? Maybe some unmet dependencies that the runtime does not complain about?

@magreenblatt, do you have any tips on how I can continue on debugging this problem? I am running out of ideas. A big difference between cefclient and my project is that I do not use OpenGL, since I am outputting the framebuffer to another video-device entirely. (this is not the bottleneck, as I have tested with a "null operation" Paint() function, and it is still only called sub 10 frames per second)
haakonn
Newbie
 
Posts: 8
Joined: Mon Dec 01, 2014 1:50 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 89 guests