Linux: External message pump is slow and some actions don't work

Issue #2002 new
Czarek Tomczak created an issue

I've been implementing external message pump in CEF Python using the example implementation from cefclient and pages load up to 2x slower when compared to calling CefDoMessageLoopWork in a periodic 10ms timer.

There is also a bug with mouse context menu, it disappears immediately.

Both of these issues (slowness and mouse context menu) are reproducible when running cefclient with the --external-message-pump flag.

CEF: 3.2785.1481.gc3a7e2c OS: Ubuntu 14.04 64-bit (all updates)

When running ./cefclient and ./cefclient --external-message-pump there is an additional X Window Error "BadDrawable" when quiting app (3 errors vs 4 errors). Maybe it has something to do with this issue. Logs below.

cz@comp:~/github/cefpython/src/linux/binaries_64bit$ ./cefclient

[0925/134937:WARNING:cefclient_gtk.cc(34)] X error received: type 0, serial 308, error_code 8, request_code 42, minor_code 0

[0925/134941:WARNING:x11_util.cc(1409)] X error received: serial 412, error_code 181 (GLXBadWindow), request_code 154, minor_code 32 (Unknown)

[0925/134941:WARNING:x11_util.cc(1409)] X error received: serial 415, error_code 3 (BadWindow), request_code 4, minor_code 0 (Unknown)

----------------------------------------------------------------------------

cz@comp:~/github/cefpython/src/linux/binaries_64bit$ ./cefclient --external-message-pump

[0925/134923:WARNING:cefclient_gtk.cc(34)] X error received: type 0, serial 308, error_code 8, request_code 42, minor_code 0

[0925/134929:WARNING:x11_util.cc(1409)] X error received: serial 357, error_code 181 (GLXBadWindow), request_code 154, minor_code 32 (Unknown)

[0925/134929:WARNING:x11_util.cc(1409)] X error received: serial 359, error_code 9 (BadDrawable), request_code 153, minor_code 4 (Unknown)

[0925/134929:WARNING:x11_util.cc(1409)] X error received: serial 360, error_code 3 (BadWindow), request_code 4, minor_code 0 (Unknown)

I've also noticed that when closing window there is a significant delay in reaction, I believe this is caused by the 0.5 sec usleep in the Run() method.

Official response

Comments (9)

  1. Czarek Tomczak reporter

    Returning feedback as requested. Tested CEF branch 3029 on Ubuntu 14.04

    1. OK. The speed of loading web pages is now fine. Previously time of loading a web page with external message pump increased loading time x2. Now it loads in the same time.

    2. OK. Tested HTML5 test at http://peacekeeper.futuremark.com/run.action and the score is the same for default loop and external message loop. However, it's not all good, see point 3.

    3. BAD. Animations are laggy, even though Peacekeeper HTML 5 test score shows that performance is good, my eye can see very slow frame rate. Looks like frames for display are lost with external message pump.

    4. BAD. Mouse context menu still doesn't work.

    Tested with these flags:

    # Normal
    ./cefclient --url=http://peacekeeper.futuremark.com/run.action
    
    # External message pump
    ./cefclient --url=http://peacekeeper.futuremark.com/run.action --external-message-pump
    
  2. Log in to comment