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.

Flash Game 50% CPU

Post Reply
BBC
Posts: 9
Joined: Tue Feb 27, 2018 11:38 am

Flash Game 50% CPU

Post 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?
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Flash Game 50% CPU

Post 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.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Flash Game 50% CPU

Post 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
BBC
Posts: 9
Joined: Tue Feb 27, 2018 11:38 am

Re: Flash Game 50% CPU

Post by BBC »

Thanks for the answer!
Tried:
Image
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Flash Game 50% CPU

Post 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.
BBC
Posts: 9
Joined: Tue Feb 27, 2018 11:38 am

Re: Flash Game 50% CPU

Post by BBC »

Thanks for the answer!
I'm sorry, Flash Game in all browsers loads CPU 50%
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Flash Game 50% CPU

Post 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.
Post Reply