Page 2 of 2

Re: Slow Loading CEF files

Posted: Tue Mar 19, 2024 5:10 pm
by salvadordf
The delay could be caused by several reasons :
  • The application could be waiting for CEF to be initialized before creating the browser and then navigating to the default URL.
  • The network may have issues at that time. In this point you can include temporary issues, slow Internet service providers, WiFi issues, Internet censorship by some governments, etc.
  • There's a proxy in the operating system or local network.
  • The antivirus is checking the application at that time.
  • The application doesn't use a cache directory and the browser has to download the whole web page each time.

Re: Slow Loading CEF files

Posted: Thu Mar 21, 2024 6:44 pm
by jsperry
Thank you I got it working!

I do have one other problem. I've written two separate applications. Both using the TChromium component.
I've followed these instructions for closing:
// Destruction steps
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEF_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.

One application works just fine and the other never fires the OnBeforeClose event. I'm at a loss currently as to why this might be happening.

Re: Slow Loading CEF files

Posted: Thu Mar 21, 2024 7:52 pm
by jsperry
I found the issue. I did not have the following procedure.

procedure BrowserDestroyMsg(var aMessage : TMessage); message CEF_DESTROY;

Thank you for all your help! This is a great forum.