Page 1 of 1

JavaScript Performance

Posted: Wed Jan 20, 2021 4:03 pm
by Brendo
Hi, I'm testing a React.js project and I noticed that it loses performance when tested in DCEF. Performance on other browsers is higher.

https://github.com/BrendoRochaDel/example
An example is this project that renders a table. I tested it on all demos.

How can I increase performance?

Re: JavaScript Performance

Posted: Thu Jan 21, 2021 9:17 am
by salvadordf
Hi,

Try setting GlobalCEFApp.EnableGPU to TRUE before the GlobalCEFApp.StartMainProcess call in the DPR file.

Re: JavaScript Performance

Posted: Thu Jan 21, 2021 2:27 pm
by Brendo
Hi, I have already tested the GlobalCEFApp.EnableGPU setting to TRUE, but it is still taking time. In Chrome it takes 2 seconds and in MiniBrowser 10 seconds.

I hosted the site to facilitate testing: https://exampletable.000webhostapp.com/

Re: JavaScript Performance

Posted: Thu Jan 21, 2021 3:13 pm
by salvadordf
I just did a few tests and I saw similar elapsed times.

Please, try the latest CEF4Delphi version available at GitHub :
https://github.com/salvadordf/CEF4Delphi

Repeat the test 2 or 3 times to avoid network issues and compare the results with the same Chromium version (88.0.4324.96)

If you still see a performace issue it would be interesting to test the official CEF sample application :
https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_linux32_client.tar.bz2

Sometimes the antivirus blocks the CEF libraries for a few seconds. Disable the antivirus while doing the tests.

Re: JavaScript Performance

Posted: Thu Jan 21, 2021 6:29 pm
by Brendo
My CEF4Delphi was in version 86, I updated it and to my surprise what was taking 10 seconds is now taking 14 seconds.

Anyway, I found out what the problem was. I was using the DLLs from the Debug folder, I moved to the Release folder and now the performance is similar to Chrome.

Thank you very much.