Page 1 of 1

Flash Game 50% CPU

Posted: Wed Mar 07, 2018 11:14 am
by BBC
i7-6700HQ CPU
Windows 10 Pro 1709
CEF 3.3282.1741.gcd94615
Chrome 64.0.3282.186
Flash Player 28_0_0_161
Image
Please tell me how to fix it?

Re: Flash Game 50% CPU

Posted: Wed Mar 07, 2018 12:23 pm
by salvadordf
How do you enable the flash plugin in your app?

In order to help you I would need to see your GlobalCEFApp initialization code from your DPR file.

Re: Flash Game 50% CPU

Posted: Wed Mar 07, 2018 12:29 pm
by salvadordf
Do you use this code ?

Code: Select all

GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.AddCustomCommandLine('--ppapi-flash-path', ExtractFilePath(Application.ExeName) + 'plugins\pepflashplayer32_28_0_0_161.dll');
GlobalCEFApp.AddCustomCommandLine('--ppapi-flash-version', '28.0.0.161');
If you use that code you can improve Flash performance adding this :

Code: Select all

GlobalCEFApp.AddCustomCommandLine('--enable-accelerated-plugins');
GlobalCEFApp.AddCustomCommandLine('--enable-gpu-plugin');
Remember that you can also use this instead of all that code :

Code: Select all

GlobalCEFApp.EnableGPU := True;
GlobalCEFApp.CustomFlashPath := 'plugins';
It's also recommended that you set a cache directory :

Code: Select all

GlobalCEFApp.cache := 'cache'; // this directory must be writable

Re: Flash Game 50% CPU

Posted: Wed Mar 07, 2018 1:53 pm
by BBC
Thanks for the answer!
Tried:
Image

Re: Flash Game 50% CPU

Posted: Wed Mar 07, 2018 2:36 pm
by salvadordf
The first screenshot shows the parameters of a web browser using the flash plugin installed in the system with GPU acceleration enabled and a cache directory.

That configuration should give the best performance! :shock:

Please, test your game with the official CEF sample application :
http://opensource.spotify.com/cefbuilds ... nt.tar.bz2

Decompress that file, run cefclient.exe with these parameters and test your game :

Code: Select all

cefclient.exe --enable-system-flash --enable-accelerated-plugins --enable-gpu-plugin --cache-path="cache"
If you still see the same problem, please post the URL of your game if possible.

Re: Flash Game 50% CPU

Posted: Thu Mar 08, 2018 9:27 am
by BBC
Thanks for the answer!
I'm sorry, Flash Game in all browsers loads CPU 50%

Re: Flash Game 50% CPU

Posted: Thu Mar 08, 2018 10:32 am
by salvadordf
If that flash game also has problems with cefclient then these could be the causes :
  • An unknown CEF3 bug.
  • An unknown Flash plugin bug.
  • An unknown bug in the GlobalCEFApp.SitePerProcess feature. Try setting GlobalCEFApp.SitePerProcess to FALSE.
  • That game may be included in a web page with ads that are blocked in Chrome but cefclient shows everything. Those ads may be the cause of the high cpu usage.