Page 1 of 2

Update to CEF 3.3538.1852.gcb937fc

Posted: Thu Nov 15, 2018 6:32 pm
by salvadordf
Hi,

I just uploaded a new version of CEF4Delphi and this is what's new :
  • Update to CEF 3.3538.1852.gcb937fc.
  • The issue #139 has been fixed. Read the comments in GitHub for more details. If you have any issue, you can disable this fix by setting the new GlobalCEFApp.DestroyAppWindows property to FALSE. https://github.com/salvadordf/CEF4Delphi/issues/139
  • Added a LoadHandler in the render process. Now you can use the GlobalCEFApp.OnLoadingStateChange, GlobalCEFApp.OnLoadStart, GlobalCEFApp.OnLoadEnd and GlobalCEFApp.OnLoadError events in the render process.
  • Fixed a Delphi XE2 compilation issue.
The CEF3 binaries are :

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Sun Nov 18, 2018 11:40 am
by xpert13
Hello, salvadordf.

The fix of issue #139 doesn't work when I try to use External Message Pump. Even if I just create a TCEFWorkScheduler object it's broke Excel starting speed.

For my application very important to use External Message Pump. Is there any way to fix bug and use single EXE file?

P.S. ExternalPumpBrowser demo has same problem.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Sun Nov 18, 2018 11:48 am
by xpert13
I tried to execute SubProcess example and it doesn't help. Excel is starting to slow.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Sun Nov 18, 2018 1:54 pm
by salvadordf
Thanks for reporting this xpert13 !
I'll take a look as soon as I can.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Mon Nov 19, 2018 5:59 pm
by xpert13
I found a reason - AllocateHWnd in TCEFWorkScheduler.AfterConstruction

When I comment this line

Code: Select all

FCompHandle      := AllocateHWnd(WndProc);
Excel works fine.

And I don't know why, but Chromium works fine too. As I can see this window created for CEF_PUMPHAVEWORK message but even if it doesn't exist somehow application works.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Mon Nov 19, 2018 6:18 pm
by salvadordf
Thanks again! :D

TCEFWorkScheduler calls AllocateHWnd to receive the CEF_PUMPHAVEWORK message and schedule the calls to DoMessageLoopWork. Commenting the AllocateHWnd line will degrade the browser performance.

I'll try to modify WndProc to reply correctly to the WM_DDE_INITIATE message Excel sends... as soon as I have time... :oops:

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Mon Nov 19, 2018 6:27 pm
by salvadordf
...now that I think of it... perhaps the solution is not creating TCEFWorkScheduler when GlobalCEFApp.ProcessType isn't ptBrowser.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Mon Nov 19, 2018 6:55 pm
by xpert13
salvadordf wrote: Mon Nov 19, 2018 6:27 pm ...now that I think of it... perhaps the solution is not creating TCEFWorkScheduler when GlobalCEFApp.ProcessType isn't ptBrowser.
It did not help. I have already tried this option. In this case WndProc didn't receive WM_DDE_INITIATE but Excel still runs slowly.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Tue Nov 20, 2018 9:52 am
by xpert13
perhaps the solution is not creating TCEFWorkScheduler when GlobalCEFApp.ProcessType isn't ptBrowser.
I am sorry, I made a mistake. Your solution is right. It fix the issue with Excel.

Re: Update to CEF 3.3538.1852.gcb937fc

Posted: Thu Nov 22, 2018 2:05 pm
by salvadordf
I uploaded the fix for this issue.

Please, download CEF4Delphi again and try the external message pump demos as they are with excel.