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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Subprocess demo slow to close

Post Reply
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

Subprocess demo slow to close

Post by RaelB »

Hi,
The subprocess demo takes about 10-12 seconds to close on my computer (Windows 10 x64). Is there any way to speed this up?
A non-subprocess demo closes in about 3 seconds.
Thanks
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Subprocess demo slow to close

Post by salvadordf »

I haven't seen that problem in my computer.

Can you repeat the test while you disable the antivirus?
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

Re: Subprocess demo slow to close

Post by RaelB »

I am only using built in windows protection, not another AV. Still, disabling it does not make a difference.
(I'm using latest code/cef, CEF 102.0.10)
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

Re: Subprocess demo slow to close

Post by RaelB »

Small demo:
https://www.bauerapps.com/dev/cef_subprocess_slow.mp4

When click on close button, another window replaces the current one, and the taskbar icon is replaced
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Subprocess demo slow to close

Post by salvadordf »

I can't reproduce that issue but I have my suspicions...

That demo shares the same uCEFLoader unit by the two projects in the SubProcessGrp.groupproj group.

In the past I had to build the SimpleBrowser_sp project individually first and then build the SimpleBrowser project because Delphi had issues compiling the uCEFLoader unit two times. Using the "Build all" option in the group didn't work or had issues.

Please, try the JavaScript\JSWindowBindingSubProcess demo. Open the group and use the "Build All" option before running it.

Is the SubProcess demo the only demo with this problem?
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

Re: Subprocess demo slow to close

Post by RaelB »

The JSWindowBindingSubProcess demo worked fine.

I went back to the Subprocess demo and pointed to the "Subprocess.exe" (this is from the JS demo)

Code: Select all

  {$IFDEF CEFSUBPROCESS}
  GlobalCEFApp := TCefApplicationCore.Create;
  {$ELSE}
  GlobalCEFApp := TCefApplication.Create;
  //GlobalCEFApp.BrowserSubprocessPath := 'SimpleBrowser_sp.exe';
  GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
  {$ENDIF}
That worked fine. Changed code to point to the 'SimpleBrowser_sp.exe'. That also worked fine.
I deleted subprocess exe's, re-built the SimpleBrowser_sp proj, then the SimpleBrowser proj, that is now working fine.

Hmm, I hate those kind of inconsistencies :). Anyway seems to be fine now, thanks for your help.
Post Reply