make cef smaller

Having problems with building or using CEF? This forum is here to help. Please do not post bug reports or feature requests here.

make cef smaller

Postby JohnJ » Sat Aug 14, 2010 1:01 pm

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
JohnJ
Newbie
 
Posts: 2
Joined: Fri Aug 13, 2010 11:51 am

Re: make cef smaller

Postby magreenblatt » Mon Aug 23, 2010 8:31 am

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.
magreenblatt
Site Admin
 
Posts: 8738
Joined: Fri May 29, 2009 6:57 pm

Re: make cef smaller

Postby perrstep » Thu Jun 16, 2011 3:27 pm

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
perrstep
Techie
 
Posts: 25
Joined: Thu Nov 18, 2010 6:02 pm

Re: make cef smaller

Postby magreenblatt » Thu Jun 16, 2011 3:35 pm

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.
magreenblatt
Site Admin
 
Posts: 8738
Joined: Fri May 29, 2009 6:57 pm

Re: make cef smaller

Postby synulation » Fri Jun 17, 2011 11:11 pm

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.
synulation
Newbie
 
Posts: 2
Joined: Fri Jun 17, 2011 11:05 pm

Re: make cef smaller

Postby magreenblatt » Sat Jun 18, 2011 7:46 am

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.
magreenblatt
Site Admin
 
Posts: 8738
Joined: Fri May 29, 2009 6:57 pm

Re: make cef smaller

Postby cagret » Sat Jun 18, 2011 9:22 am

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%).
User avatar
cagret
Techie
 
Posts: 41
Joined: Fri Mar 11, 2011 11:42 am
Location: Poland

Re: make cef smaller

Postby cagret » Sun Jun 19, 2011 1:53 am

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?
User avatar
cagret
Techie
 
Posts: 41
Joined: Fri Mar 11, 2011 11:42 am
Location: Poland

Re: make cef smaller

Postby magreenblatt » Sun Jun 19, 2011 9:26 am

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.
magreenblatt
Site Admin
 
Posts: 8738
Joined: Fri May 29, 2009 6:57 pm

Re: make cef smaller

Postby cagret » Sun Jun 19, 2011 10:38 am

You are right, it crashes when editing text fields.
User avatar
cagret
Techie
 
Posts: 41
Joined: Fri Mar 11, 2011 11:42 am
Location: Poland

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 18 guests