Page 1 of 1

Re: Chromium1.CreateBrowser() takes 30 Seconds to complete

Posted: Wed Aug 14, 2019 8:55 pm
by salvadordf
Where are the CEF binaries in each case?

The browser will be slower If they are located in the server.

Re: Chromium1.CreateBrowser() takes 30 Seconds to complete

Posted: Thu Aug 15, 2019 7:04 am
by salvadordf
Please, try the suggestions available in this forum thread :
https://www.briskbard.com/forum/viewtop ... f=10&t=792

Re: Chromium1.CreateBrowser() takes 30 Seconds to complete

Posted: Thu Aug 15, 2019 7:40 am
by salvadordf
I forgot to add something else....

If your application has a complex initialization I would also try a different EXE for the subprocesses as shown in the "SubProcess" demo.

Re: Chromium1.CreateBrowser() takes 30 Seconds to complete

Posted: Thu Aug 15, 2019 1:57 pm
by salvadordf
TChromiumWindow is equivalent to a TCEFWindowParent with a TChromium child control.

However, I would use your existing application code and then add this line before the GlobalCEFApp.StartMainProcess call :

Code: Select all

GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
Then add the same GlobalCEFApp property values to SubProcess.dpr, except GlobalCEFApp.BrowserSubprocessPath

As you can see in the SubProcess demo, the CreateGlobaleCEFApp procedure is defined in uCEFLoader.pas and the calls to CreateGlobaleCEFApp and DestroyGlobaleCEFApp are made in the initialization and finalization sections of uCEFLoader.pas

Having a uCEFLoader.pas file allows you to have a much simpler DPR file in your application but this is not a requirement.

There's only one drawback if you use a different EXE for the subprocesses : Some antiviruses show a false positive in SubProcess.exe

This is a known issue with some antivirus programs that affects some applications made with Delphi. The easiest solution would be to add the SubProcess.exe to the whitelist.

I haven't tried this but some say that "stuffing" SubProcess.exe with more code or resources might give a different result with your antivirus. Some other people say that signing all the EXE and DLL files might also be a solution.