Page 1 of 1

MultiThreadedMessageLoop implications

Posted: Sun Jul 02, 2017 10:01 am
by petko
What is the difference when enabling/disabling MultiThreadedMessageLoop? Is the performance different?

I am asking because my code until now assumed that CreateBrowser is a synchronous function (I was using dcef3 where it is). So, currently I set MultiThreadedMessageLoop := False to force this. However, if the performance of the MultiThreadedMessageLoop is better, I will rewrite the code to take advantage of it.

Re: MultiThreadedMessageLoop implications

Posted: Sun Jul 02, 2017 10:46 am
by salvadordf
Hi,

I haven't run any benchmarks but I noticed that it improves the user interface responsiveness.

Quoting Marshall Greenblatt : http://magpcss.org/ceforum/viewtopic.ph ... oop#p18180
it's intended for use when integrating CEF into frameworks that have their own hidden message loop implementation.
Another quote from another CEF binding : https://github.com/cztomczak/cefpython/issues/133
Multi threaded message loop may help improve performance in some applications. For best performance it is recommended that multi threaded message loop is used instead of external message pump on Windows platform
Those are very old and incomplete quotes, so you should do some tests in your own app.

Re: MultiThreadedMessageLoop implications

Posted: Mon Jul 03, 2017 9:18 am
by petko
I've done some tests and it seems that in all cases the async version results in equal or faster browser creation and first page load, so it is worth rewriting the code.