Probably I will just check if a page was loaded correctly (all resources were loaded) and if not, I will reload it.salvadordf wrote: Sat Jan 27, 2018 8:04 am If you can't find a way to load all of your web pages correctly at the same time you can also delay some of them.
For example, load 2 at a time and then the next 2 pages.
Also check that the code in the BeforeResourceLoad and GetResourceHandler events can work correctly under heavy load.
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.
Tuning external message pump performance
Re: Tuning external message pump performance
Re: Tuning external message pump performance
What could be the reason for this behavior? I am now having trouble with some events that I need to assign after creating the TChromium component.. Could it be the CEF scheduler thread?petko wrote: Fri Jan 26, 2018 8:08 pm The problem was that I was setting Chromium events after calling CreateBrowser (I use ChromiumWindow and not CEFWindowParent) and for some reason none of these events was fired. I now set the events before creating the browser and the events work.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Tuning external message pump performance
Hi,
That feature was introduced in this update as a workaround for a CEF3 bug and because it's an efficient use of resources :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=234
TChromium checks what events where assigned to know which handlers have to be created in the CreateBrowser function.
In case you need to use an event after the CreateBrowser call you can do this :
Those handlers generate these events :
TChromium only creates the handlers that you're going to use and the handlers execute the events only if they are created.petko wrote: Sun Jan 28, 2018 3:20 pmWhat could be the reason for this behavior? I am now having trouble with some events that I need to assign after creating the TChromium component.. Could it be the CEF scheduler thread?petko wrote: Fri Jan 26, 2018 8:08 pm The problem was that I was setting Chromium events after calling CreateBrowser (I use ChromiumWindow and not CEFWindowParent) and for some reason none of these events was fired. I now set the events before creating the browser and the events work.
That feature was introduced in this update as a workaround for a CEF3 bug and because it's an efficient use of resources :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=234
TChromium checks what events where assigned to know which handlers have to be created in the CreateBrowser function.
In case you need to use an event after the CreateBrowser call you can do this :
- Implement the event and assign it to TChromium before you call CreateBrowser.
- Use a boolean variable with an if..then clause inside that event to execute your code only when you set that boolean variable to True outside that event.
Those handlers generate these events :
- OnBeforePopup
- OnAfterCreated
- OnBeforeClose
- OnClose
- OnBeforeBrowse
- OnOpenUrlFromTab
- OnBeforeResourceLoad
- OnGetResourceHandler
- OnResourceRedirect
- OnResourceResponse
- OnGetResourceResponseFilter
- OnResourceLoadComplete
- OnGetAuthCredentials
- OnQuotaRequest
- OnProtocolExecution
- OnCertificateError
- OnSelectClientCertificate
- OnPluginCrashed
- OnRenderViewReady
- OnRenderProcessTerminated
OK, I will create dummy events before using CreateBrowser and later set the proper event handlers.
P.S.: I guess it is not possible to create and assign handlers after CreateBrowser is called? If it was, it would've been much more convenient to create them on the fly - when you try to assign an event handler for a non-existing handler..
P.S.: I guess it is not possible to create and assign handlers after CreateBrowser is called? If it was, it would've been much more convenient to create them on the fly - when you try to assign an event handler for a non-existing handler..
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Tuning external message pump performance
It's not possible to create the handlers after the CreateBrowser call.
CEF3 uses the default handler implementation if no custom handler is provided in the CreateBrowser function.
CEF3 uses the default handler implementation if no custom handler is provided in the CreateBrowser function.