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.

Chromium slows down the start of excel or word

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

Re: Chromium slows down the start of excel or word

Post by salvadordf »

This issue may be related to this old DCEF3 issue :
https://github.com/hgourvest/dcef3/issues/72
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Chromium slows down the start of excel or word

Post by salvadordf »

After some tests, there is a workaround for this issue : Use a different EXE for the subprocesses as shown in the "SubProcess" demo.

I created an issue to save all the information related to this problem :
https://github.com/salvadordf/CEF4Delphi/issues/139

There seems to be a DDE problem or incompatibility between Excel and the way subprocesses are handled in CEF4Delphi.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Chromium slows down the start of excel or word

Post by salvadordf »

I just uploaded the fix for this issue. Please, download CEF4Delphi again.
andreas michelberger
Posts: 12
Joined: Tue Aug 08, 2017 11:42 am

Re: Chromium slows down the start of excel or word

Post by andreas michelberger »

Hallo Salvador after many investigations we were able to solve the Problem in our system.
We use SubProcesses. The problem arises as soon as a VCL unit (for example Vcl.Forms) is included in the subprocess.
For example, when the initialization-Section in VCL.Forms is called, the problem occurs.
After no more vcl-unit was used in our subprocess Excel could be started up quickly.
Kindly regards
Andreas
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Chromium slows down the start of excel or word

Post by salvadordf »

Hi Andreas,

You're right. I should've explained this issue in more detail.

The comments I added in the issue #139 only mentioned the problem with Application.Handle and Application.PopupControlWnd.
https://github.com/salvadordf/CEF4Delphi/issues/139

"Application" is created in Vcl.Forms and it should not be added to the subprocesses.

A similar problem happened when you added TCEFWorkScheduler in browsers using an external message pump. It calls "AllocateHWnd" and that caused freezes in the subprocesses.

However, the latest CEF4Delphi version works correctly and this issue was fixed. :D

Thanks!!!
crystalxp
Posts: 39
Joined: Tue Jul 04, 2017 8:23 am

Re: Chromium slows down the start of excel or word

Post by crystalxp »

I have this problem too, Any suggestion?
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Chromium slows down the start of excel or word

Post by salvadordf »

crystalxp wrote: Sat Jan 26, 2019 2:41 pmI have this problem too, Any suggestion?
Try this :
  • Update CEF4Delphi to the latest version.
  • If you use the same EXE for all the browser processes then try removing unused units from the "uses" section in the DPR file.
  • If you can't remove more units from the DPR file and you still have this problem then you need to use a different EXE for the subprocesses. The SubProcess demo shows you how to do that.
Excel broadcasts WM_DDE_INITIATE and waits until all top-level "windows" (using the Windows API term) process that message. The delay is caused by any top-level "window" that is busy or locked and can't process WM_DDE_INITIATE.

As you know, CEF3 creates multiple processes. The main browser process has no problem with WM_DDE_INITIATE but the subprocesses can't even see it because they are executing some internal CEF3 functions.

If an application uses the same EXE for all the processes and it has a unit in the DPR file that creates a "window" then the subprocesses won't be able to process WM_DDE_INITIATE and Excel will be delayed.
Post Reply