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.

Slow Loading CEF files

User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Slow Loading CEF files

Post 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.
jsperry
Posts: 7
Joined: Mon Mar 18, 2024 11:47 am

Re: Slow Loading CEF files

Post 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.
jsperry
Posts: 7
Joined: Mon Mar 18, 2024 11:47 am

Re: Slow Loading CEF files

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