Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

MultiThreadedMessageLoop implications

Post Reply
petko
Posts: 52
Joined: Sun Jul 02, 2017 9:58 am

MultiThreadedMessageLoop implications

Post 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.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: MultiThreadedMessageLoop implications

Post 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.
petko
Posts: 52
Joined: Sun Jul 02, 2017 9:58 am

Re: MultiThreadedMessageLoop implications

Post 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.
Post Reply