Where are the CEF binaries in each case?
The browser will be slower If they are located in the server.
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.
Chromium1.CreateBrowser() takes 30 Seconds to complete
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Chromium1.CreateBrowser() takes 30 Seconds to complete
Please, try the suggestions available in this forum thread :
https://www.briskbard.com/forum/viewtop ... f=10&t=792
https://www.briskbard.com/forum/viewtop ... f=10&t=792
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Chromium1.CreateBrowser() takes 30 Seconds to complete
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.
If your application has a complex initialization I would also try a different EXE for the subprocesses as shown in the "SubProcess" demo.
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Chromium1.CreateBrowser() takes 30 Seconds to complete
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 :
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.
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';
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.