make cef smaller

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: make cef smaller

Postby DarthCoder » Wed Jun 22, 2011 2:29 am

magreenblatt wrote: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.


Is there some reference of what each of the flags in features_override.gypi refer to? If I want only HTML4, JavaScript and Flash Plug-in support at the moment, what all flags can I safely disable.
DarthCoder
Techie
 
Posts: 23
Joined: Mon Jun 20, 2011 4:57 am

Re: make cef smaller

Postby hawkgao » Sun Sep 18, 2011 7:55 am

I try to config features.gypi to remove some features i don't need. This file locates at "Chromium\src\third_party\WebKit\Source\WebKit\chromium\features.gypi". "build\features_override.gypi" has been removed.
But i got many compiling error in v8 project. v8 seems refer to the features i comment out directory, without gyp's config.

some error log, I removed SVG and video support.

Code: Select all
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8HTMLIFrameElement.cpp(205) : error C2039: 'getSVGDocument' : is not a member of 'WebCore::HTMLIFrameElement'
3>        d:\CEF\Chromium\src\third_party\WebKit\Source\WebCore\html\HTMLIFrameElement.h(31) : see declaration of 'WebCore::HTMLIFrameElement'
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8HTMLIFrameElement.cpp(207) : error C2065: 'SVGDocument' : undeclared identifier
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8HTMLIFrameElement.cpp(207) : error C2039: 'getSVGDocument' : is not a member of 'WebCore::HTMLIFrameElement'
3>        d:\CEF\Chromium\src\third_party\WebKit\Source\WebCore\html\HTMLIFrameElement.h(31) : see declaration of 'WebCore::HTMLIFrameElement'
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8HTMLIFrameElement.cpp(207) : error C2512: 'WTF::RefPtr' : no appropriate default constructor available
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8HTMLIFrameElement.cpp(210) : error C2662: 'WTF::RefPtr<T>::release' : cannot convert 'this' pointer from 'WTF::RefPtr' to 'WTF::RefPtr<T> &'
3>        Reason: cannot convert from 'WTF::RefPtr' to 'WTF::RefPtr<T>'
3>        Conversion requires a second user-defined-conversion operator or constructor
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8CanvasRenderingContext2D.cpp(962) : error C2653: 'V8HTMLVideoElement' : is not a class or namespace name
3>D:\CEF\Chromium\src\cef\Release\obj\global_intermediate\webcore\bindings/V8CanvasRenderingContext2D.cpp(962) : error C2653: 'V8HTMLVideoElement' : is not a class or namespace name
hawkgao
Mentor
 
Posts: 83
Joined: Thu Aug 04, 2011 9:40 pm

Re: make cef smaller

Postby Benvie » Sun Sep 18, 2011 4:11 pm

You can compress the dll down to like 6mb using this:

http://portableapps.com/apps/utilities/ ... pcompactor
Benvie
Techie
 
Posts: 20
Joined: Wed Aug 10, 2011 2:58 pm

Re: make cef smaller

Postby hawkgao » Sun Sep 18, 2011 10:16 pm

Benvie, Thank you for advice. As some guys mentioned before, the dll loading will take more time. because it should be unzipped to real dll. When crash happens, Is this dll can dump correct callstack trace? I don't known if the unzip process bring to any other unstable situation. Do you have any experiences to this tool? Is that stable?
hawkgao
Mentor
 
Posts: 83
Joined: Thu Aug 04, 2011 9:40 pm

Re: make cef smaller

Postby gaddlord » Mon Jan 04, 2016 4:47 pm

I have been successful into keeping only

libcef.dll - main CEF1 dll
icudt.dll - support for Unicode
Locales\en-US.pak - default localization bundle

Aftre UPX-ing them I am NOW having 10MB extra load.

all the rest I have removed and it works OK.
gaddlord
Newbie
 
Posts: 1
Joined: Mon Jan 04, 2016 4:42 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 35 guests