CEF / JCEF production build size

Having problems with building or using the JCEF Java binding? Ask your questions here.

CEF / JCEF production build size

Postby uptoyou » Wed Jul 12, 2017 1:09 am

Is there any option for minified production build? Because it about 500 mb just for chromium itself. For example electron has about 100mb with nodejs including, or it is their own killer-feature ?
uptoyou
Newbie
 
Posts: 1
Joined: Wed Jul 12, 2017 1:04 am

Re: CEF / JCEF production build size

Postby magreenblatt » Wed Jul 12, 2017 10:30 am

Are you on Linux? If so, strip the binaries.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF / JCEF production build size

Postby Phylanx » Wed Jul 26, 2017 1:43 am

Hi!

I just found this thread and wanted to reuse it, because it has the same goal, also we already discussed a similar topic here: viewtopic.php?f=17&t=14829
As we use JCEF, the JCEF/CEF binaries are all loaded in Javas native memory.

Our environment is as following:
JCEF version 3.2704
jdk1.8.0_60 32 bit
Windows 32 bit process

As far as I understand the native memory, all DLLs used for or chromium integration are loaded there, including the 58MB libcef.dll
We have the problem at our customer, that sometimes the native memory is that hard fragmented, that we can't even get those 58MB memory at once:

Code: Select all
java.lang.UnsatisfiedLinkError: C:\systema\mpa_khbra\bin\win_x32\libcef.dll: Für diesen Befehl ist nicht genügend Speicher verfügbar
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at org.cef.CefApp.<init>(CefApp.java:152)
   at org.cef.CefApp.getInstance(CefApp.java:247)
   at at.co.systema.ui.controls.UIWebBrowserCEF.initCEF(UIWebBrowserCEF.java:75)
   at at.co.systema.ui.controls.UIWebBrowserCEF.<init>(UIWebBrowserCEF.java:59)


Is there a chance to make this libcef.dll smaller?
Since this is a java speciality and a hard limitation on 32 bit processes, wouldn't it be good to keep the native overhead on a minimum?
Just loading a small jcef/cef.dll that starts a native process using the real big DLLs? Just thinking, knowing that will not happen - a whole process model change...

Unfortunatly we can't use less XMX and we can't use 64 bit JDK because of other DLLs we need to load.
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: CEF / JCEF production build size

Postby Phylanx » Mon Jul 31, 2017 6:30 am

Our workaround now is that we do a preloading just at application startup.
Even if we don't need them, we load the chromium DLLs (jawt/jcef/libcef dll), so we avoid loading it when the memory is more fragmented.
I just hope our binaries we load later won't have a problem with that...
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 6 guests