Page 1 of 2

make cef smaller

PostPosted: Sat Aug 14, 2010 1:01 pm
by JohnJ
It seems cef, with the design goal of becoming an embedded ActiveX control, is quite large in terms of size. The libcef.dll is 13MB and icudt42.dll is 10Mb. I am wondering if we could reduce the sizes by selectively turning off certain features of webkit/chrome? By the way, I think this is the best framework for embedding webkit on windows.

Thanks
John

Re: make cef smaller

PostPosted: Mon Aug 23, 2010 8:31 am
by magreenblatt
You can disable WebKit features by modifying the build/features_override.gypi file and then re-running the cef_create_projects.bat script. It might be interesting to create a chart showing how much the file size is reduced when various features are disabled.

Re: make cef smaller

PostPosted: Thu Jun 16, 2011 3:27 pm
by perrstep
Hi everybody,

It's been a while since the last post in this thread, but today the DLLs we have to ship with CEF account for a total of 37.4 MB. I have read in the archives that icudt42 is for Unicode support and is required, but what about icudt.dll ? And what about the other DLLs?

Is there anything that can be done to reduce the size of libcef.dll proper also? Are there any successfull reports of people rebuilding CEF with features disabled?

My bosses are asking because shipping with CEF doubles the size of our installer.

30/05/2011 01:20 PM 1,305,102 avcodec-52.dll
30/05/2011 01:20 PM 160,782 avformat-52.dll
30/05/2011 01:20 PM 96,782 avutil-50.dll
30/05/2011 01:20 PM 9,070,080 icudt.dll
19/04/2011 06:16 PM 11,040,768 icudt42.dll
30/05/2011 01:20 PM 17,572,864 libcef.dll

Thanks for any insights.

Stéphane Perras

Re: make cef smaller

PostPosted: Thu Jun 16, 2011 3:35 pm
by magreenblatt
perrstep wrote:I have read in the archives that icudt42 is for Unicode support and is required, but what about icudt.dll ? And what about the other DLLs?

icudt42.dll is an old version of icudt.dll and is no longer part of the CEF distribution. See viewtopic.php?f=10&t=307 for the rest.

Re: make cef smaller

PostPosted: Fri Jun 17, 2011 11:11 pm
by synulation
I haven't messed with disabling features (though I plan on getting to it eventually) - but if you want to reduce the distribution size, I have been satisfied using UPX (http://upx.sourceforge.net/). Taking libcef.dll as an example it took it from ~17MB to ~6MB.

Re: make cef smaller

PostPosted: Sat Jun 18, 2011 7:46 am
by magreenblatt
synulation wrote:I haven't messed with disabling features (though I plan on getting to it eventually) - but if you want to reduce the distribution size, I have been satisfied using UPX (http://upx.sourceforge.net/). Taking libcef.dll as an example it took it from ~17MB to ~6MB.

As you probably know tools like UPX work by compressing the binary and adding a new executable section that uncompresses it in memory on load. This can negatively affect load time. You might want to compare the installer size, which should include compression of the contents, with and without UPX to see if UPX makes a difference in the final distribution size.

Re: make cef smaller

PostPosted: Sat Jun 18, 2011 9:22 am
by cagret
Using NSIS installer (http://nsis.sourceforge.net/Main_Page) along with LZMA compression which it offers, gives better results than UPX'ing (by about 10-20%).

Re: make cef smaller

PostPosted: Sun Jun 19, 2011 1:53 am
by cagret
Marshall,

What is the icudt.dll for? I've deleted that file and tried to run my app, there is an error that "icudt38 is required", but I ignore this message and my app works fine, without that file! The html is displayed correctly, everything seems to be working: javascript bindings, developer tools. Is that file really required? My html files don't use any unicode, just plain ASCII. As I read ICU is for Unicode, but I don't need it, can I remove that file to save space in my installer? How do I get rid of that error message that icudt38 is required?

Re: make cef smaller

PostPosted: Sun Jun 19, 2011 9:26 am
by magreenblatt
cagret wrote:Marshall,

What is the icudt.dll for? I've deleted that file and tried to run my app, there is an error that "icudt38 is required", but I ignore this message and my app works fine, without that file! The html is displayed correctly, everything seems to be working: javascript bindings, developer tools. Is that file really required? My html files don't use any unicode, just plain ASCII. As I read ICU is for Unicode, but I don't need it, can I remove that file to save space in my installer? How do I get rid of that error message that icudt38 is required?

Last time I tried running without icudt I was unable to edit text fields. Perhaps this is no longer a problem, but I wouldn't be surprised if it breaks other things as well. Run without it at your own risk.

Re: make cef smaller

PostPosted: Sun Jun 19, 2011 10:38 am
by cagret
You are right, it crashes when editing text fields.