IPC roundtrip taking a long time

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.

IPC roundtrip taking a long time

Postby sketch34 » Fri Aug 27, 2021 6:00 am

Hi, I'm measuring the input latency and for my application I want this to be as small as possible. I'm wondering what IPC lag times I should expect? I am getting very long timings.

1) Physical mouse click -> Send mouse click event to CEF.
2) Send IPC to CEF render process request certain DOM information.
3) DOMVisitor does a handful of CefDOMDocument::GetElementById() and sends response to browser process.
3) Receive IPC response in browser process.

This is taking around 60-130ms. Eliminating (2) and the GetElementById() calls by triggering the response message in OnFocusedNodeChanged() I get around 4-60ms, average 26ms, which is still quite slow.

I saw this issue mentioned achieving a roundtrip lag of only 0.3ms! (https://bitbucket.org/chromiumembedded/cef/issues/1805/). This would be fantastic! :)

Like them, I am using OnScheduleMessagePumpWork() and calling CefDoMessageLoopWork() at ~60Hz, CEF 75.1.4+g4210896+chromium-75.0.3770.100 with OSR enabled.

Anything else that can be done to reduce the IPC times? It seems like I must be doing something wrong to get such long timings. Or it could be due to the web page itself.
sketch34
Techie
 
Posts: 11
Joined: Sun Apr 25, 2021 8:24 pm

Re: IPC roundtrip taking a long time

Postby sketch34 » Tue Aug 31, 2021 7:13 am

Okay, the IPC isn't causing the latency (apologies!)

Just did some one-way timings of the IPC messages from the Browser process -> Render process. All samples in milliseconds (see attached graph).

Average: 0.641ms
Median: 0.403ms

Image
sketch34
Techie
 
Posts: 11
Joined: Sun Apr 25, 2021 8:24 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 55 guests