Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Putting qtwebkit on a diet
@ 2017-11-29 22:12 Stefan Fröberg
  2017-11-29 23:49 ` Stefan Fröberg
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Fröberg @ 2017-11-29 22:12 UTC (permalink / raw)
  To: buildroot

Hello

Would there be interest for slimming down the fat from QtWebkit ?

I mean, when one builds the QtWebkit manually with the
Tools/Scripts/build-webkit --release --qt --minimal
I see a bunch of features disabled like the following:

-DENABLE_3D_RENDERING=0 -DENABLE_ACCELERATED_2D_CANVAS=0
-DENABLE_BATTERY_STATUS=0 -DENABLE_BLOB=0 -DENABLE_CANVAS_PATH=0
-DENABLE_CANVAS_PROXY=0 -DENABLE_CHANNEL_MESSAGING=0 -DENABLE_CSP_NEXT=0
-DENABLE_CSS_BOX_DECORATION_BREAK=0 -DENABLE_CSS_COMPOSITING=0
-DENABLE_CSS_EXCLUSIONS=0 -DENABLE_CSS_FILTERS=0
-DENABLE_CSS_GRID_LAYOUT=0 -DENABLE_CSS_HIERARCHIES=0
-DENABLE_CSS_IMAGE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=0
-DENABLE_CSS_IMAGE_SET=0 -DENABLE_CSS_REGIONS=0 -DENABLE_CSS_SHADERS=0
-DENABLE_CSS_SHAPES=0 -DENABLE_CSS_STICKY_POSITION=0
-DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=0 -DENABLE_CSS_VARIABLES=0
-DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=0
-DENABLE_CSS3_TEXT_LINE_BREAK=0 -DENABLE_DASHBOARD_SUPPORT=0
-DENABLE_DATAGRID=0 -DENABLE_DATALIST_ELEMENT=0
-DENABLE_DATA_TRANSFER_ITEMS=0 -DENABLE_DETAILS_ELEMENT=0
-DENABLE_DEVICE_ORIENTATION=0 -DENABLE_DIRECTORY_UPLOAD=0
-DENABLE_DOWNLOAD_ATTRIBUTE=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_FILTERS=0
-DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_FTPDIR=0 -DENABLE_FULLSCREEN_API=0
-DENABLE_GAMEPAD=0 -DENABLE_GEOLOCATION=0 -DENABLE_HIGH_DPI_CANVAS=0
-DENABLE_ICONDATABASE=0 -DENABLE_IFRAME_SEAMLESS=0
-DENABLE_INDEXED_DATABASE=0 -DENABLE_INPUT_SPEECH=0
-DENABLE_INPUT_TYPE_COLOR=0 -DENABLE_INPUT_TYPE_DATE=0
-DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0
-DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0
-DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_TYPE_WEEK=0
-DENABLE_INSPECTOR=0 -DENABLE_INSPECTOR_SERVER=0
-DENABLE_JAVASCRIPT_DEBUGGER=0 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0
-DENABLE_LEGACY_NOTIFICATIONS=0 -DENABLE_LEGACY_VENDOR_PREFIXES=0
-DENABLE_LEGACY_WEB_AUDIO=0 -DENABLE_LINK_PREFETCH=0 -DENABLE_MATHML=0
-DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0
-DENABLE_MEDIA_STREAM=0 -DENABLE_METER_ELEMENT=0 -DENABLE_MHTML=0
-DENABLE_MICRODATA=0 -DENABLE_MOUSE_CURSOR_SCALE=0
-DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETSCAPE_PLUGIN_API=0
-DENABLE_NETWORK_INFO=0 -DENABLE_NOSNIFF=0 -DENABLE_NOTIFICATIONS=0
-DENABLE_ORIENTATION_EVENTS=0 -DENABLE_PAGE_VISIBILITY_API=0
-DENABLE_PROGRESS_ELEMENT=0 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0
-DENABLE_RESOLUTION_MEDIA_QUERY=0 -DENABLE_RESOURCE_TIMING=0
-DENABLE_REQUEST_ANIMATION_FRAME=0 -DENABLE_SCRIPTED_SPEECH=0
-DENABLE_SECCOMP_FILTERS=0 -DENABLE_SHADOW_DOM=0
-DENABLE_SHARED_WORKERS=0 -DENABLE_SMOOTH_SCROLLING=0
-DENABLE_SQL_DATABASE=0 -DENABLE_STYLE_SCOPED=0 -DENABLE_SVG=0
-DENABLE_SVG_FONTS=0 -DENABLE_TEMPLATE_ELEMENT=0
-DENABLE_TEXT_AUTOSIZING=0 -DENABLE_THREADED_HTML_PARSER=0
-DENABLE_TOUCH_EVENTS=0 -DENABLE_TOUCH_ICON_LOADING=0
-DENABLE_TOUCH_SLIDER=0 -DENABLE_USER_TIMING=0 -DENABLE_VIBRATION=0
-DENABLE_VIDEO=0 -DENABLE_VIDEO_TRACK=0 -DENABLE_WEBGL=0
-DENABLE_WEB_AUDIO=0 -DENABLE_WEB_SOCKETS=0 -DENABLE_WEB_TIMING=0
-DENABLE_WORKERS=0 -DENABLE_XHR_TIMEOUT=0 -DENABLE_XSLT=0

Maybe there could be submenu under qt5webkit where all those features
are listed and enabled by default and users of buildroot could just
disable things they don't like/need ?
For example, I really don't have use for gamepad (ENABLE_GAMEPAD) or
geolocation (ENABLE_GEOLOCATION) on my qt5webkit build.

-S-

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Putting qtwebkit on a diet
  2017-11-29 22:12 [Buildroot] Putting qtwebkit on a diet Stefan Fröberg
@ 2017-11-29 23:49 ` Stefan Fröberg
  2017-11-30  8:02   ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Fröberg @ 2017-11-29 23:49 UTC (permalink / raw)
  To: buildroot

Update: I just tried it and the results are these:

Stock, uclibc qt5webkit size on target:
32MB

Modified uclibc qt5webkit build with "minimal" and
"use_cross_platform_context_menus" (needed for successfull build)
settings, size on target:
22 MB

So it would save about 10 MB

-S-

Stefan Fr?berg kirjoitti 30.11.2017 klo 00:12:
> Hello
>
> Would there be interest for slimming down the fat from QtWebkit ?
>
> I mean, when one builds the QtWebkit manually with the
> Tools/Scripts/build-webkit --release --qt --minimal
> I see a bunch of features disabled like the following:
>
> -DENABLE_3D_RENDERING=0 -DENABLE_ACCELERATED_2D_CANVAS=0
> -DENABLE_BATTERY_STATUS=0 -DENABLE_BLOB=0 -DENABLE_CANVAS_PATH=0
> -DENABLE_CANVAS_PROXY=0 -DENABLE_CHANNEL_MESSAGING=0 -DENABLE_CSP_NEXT=0
> -DENABLE_CSS_BOX_DECORATION_BREAK=0 -DENABLE_CSS_COMPOSITING=0
> -DENABLE_CSS_EXCLUSIONS=0 -DENABLE_CSS_FILTERS=0
> -DENABLE_CSS_GRID_LAYOUT=0 -DENABLE_CSS_HIERARCHIES=0
> -DENABLE_CSS_IMAGE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=0
> -DENABLE_CSS_IMAGE_SET=0 -DENABLE_CSS_REGIONS=0 -DENABLE_CSS_SHADERS=0
> -DENABLE_CSS_SHAPES=0 -DENABLE_CSS_STICKY_POSITION=0
> -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=0 -DENABLE_CSS_VARIABLES=0
> -DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=0
> -DENABLE_CSS3_TEXT_LINE_BREAK=0 -DENABLE_DASHBOARD_SUPPORT=0
> -DENABLE_DATAGRID=0 -DENABLE_DATALIST_ELEMENT=0
> -DENABLE_DATA_TRANSFER_ITEMS=0 -DENABLE_DETAILS_ELEMENT=0
> -DENABLE_DEVICE_ORIENTATION=0 -DENABLE_DIRECTORY_UPLOAD=0
> -DENABLE_DOWNLOAD_ATTRIBUTE=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_FILTERS=0
> -DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_FTPDIR=0 -DENABLE_FULLSCREEN_API=0
> -DENABLE_GAMEPAD=0 -DENABLE_GEOLOCATION=0 -DENABLE_HIGH_DPI_CANVAS=0
> -DENABLE_ICONDATABASE=0 -DENABLE_IFRAME_SEAMLESS=0
> -DENABLE_INDEXED_DATABASE=0 -DENABLE_INPUT_SPEECH=0
> -DENABLE_INPUT_TYPE_COLOR=0 -DENABLE_INPUT_TYPE_DATE=0
> -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0
> -DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0
> -DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_TYPE_WEEK=0
> -DENABLE_INSPECTOR=0 -DENABLE_INSPECTOR_SERVER=0
> -DENABLE_JAVASCRIPT_DEBUGGER=0 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0
> -DENABLE_LEGACY_NOTIFICATIONS=0 -DENABLE_LEGACY_VENDOR_PREFIXES=0
> -DENABLE_LEGACY_WEB_AUDIO=0 -DENABLE_LINK_PREFETCH=0 -DENABLE_MATHML=0
> -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0
> -DENABLE_MEDIA_STREAM=0 -DENABLE_METER_ELEMENT=0 -DENABLE_MHTML=0
> -DENABLE_MICRODATA=0 -DENABLE_MOUSE_CURSOR_SCALE=0
> -DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETSCAPE_PLUGIN_API=0
> -DENABLE_NETWORK_INFO=0 -DENABLE_NOSNIFF=0 -DENABLE_NOTIFICATIONS=0
> -DENABLE_ORIENTATION_EVENTS=0 -DENABLE_PAGE_VISIBILITY_API=0
> -DENABLE_PROGRESS_ELEMENT=0 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0
> -DENABLE_RESOLUTION_MEDIA_QUERY=0 -DENABLE_RESOURCE_TIMING=0
> -DENABLE_REQUEST_ANIMATION_FRAME=0 -DENABLE_SCRIPTED_SPEECH=0
> -DENABLE_SECCOMP_FILTERS=0 -DENABLE_SHADOW_DOM=0
> -DENABLE_SHARED_WORKERS=0 -DENABLE_SMOOTH_SCROLLING=0
> -DENABLE_SQL_DATABASE=0 -DENABLE_STYLE_SCOPED=0 -DENABLE_SVG=0
> -DENABLE_SVG_FONTS=0 -DENABLE_TEMPLATE_ELEMENT=0
> -DENABLE_TEXT_AUTOSIZING=0 -DENABLE_THREADED_HTML_PARSER=0
> -DENABLE_TOUCH_EVENTS=0 -DENABLE_TOUCH_ICON_LOADING=0
> -DENABLE_TOUCH_SLIDER=0 -DENABLE_USER_TIMING=0 -DENABLE_VIBRATION=0
> -DENABLE_VIDEO=0 -DENABLE_VIDEO_TRACK=0 -DENABLE_WEBGL=0
> -DENABLE_WEB_AUDIO=0 -DENABLE_WEB_SOCKETS=0 -DENABLE_WEB_TIMING=0
> -DENABLE_WORKERS=0 -DENABLE_XHR_TIMEOUT=0 -DENABLE_XSLT=0
>
> Maybe there could be submenu under qt5webkit where all those features
> are listed and enabled by default and users of buildroot could just
> disable things they don't like/need ?
> For example, I really don't have use for gamepad (ENABLE_GAMEPAD) or
> geolocation (ENABLE_GEOLOCATION) on my qt5webkit build.
>
> -S-
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Putting qtwebkit on a diet
  2017-11-29 23:49 ` Stefan Fröberg
@ 2017-11-30  8:02   ` Thomas Petazzoni
  2017-12-01 14:05     ` Stefan Fröberg
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-11-30  8:02 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 30 Nov 2017 01:49:28 +0200, Stefan Fr?berg wrote:
> Update: I just tried it and the results are these:
> 
> Stock, uclibc qt5webkit size on target:
> 32MB
> 
> Modified uclibc qt5webkit build with "minimal" and
> "use_cross_platform_context_menus" (needed for successfull build)
> settings, size on target:
> 22 MB
> 
> So it would save about 10 MB

I think that's an interesting space saving (and perhaps build time
saving as well ?). So yes, you can go ahead and submit patches to
implement more fine-grained configuration for qt5webkit :-)

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Putting qtwebkit on a diet
  2017-11-30  8:02   ` Thomas Petazzoni
@ 2017-12-01 14:05     ` Stefan Fröberg
  2017-12-01 14:10       ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Fröberg @ 2017-12-01 14:05 UTC (permalink / raw)
  To: buildroot

Hi

Allrighty then :-)

It get's even better. When enabling "optimize for size" feature and ARM
thumb2 (needed for optimize size on ARM platforms)
I could reduce QtWebkit size down to 7.6 MB ! :-)

I try to collect as many feature settings that I can find and then make
patch serie of 3 where:
- patch #1 let's user to disable/enable features individually
- patch #2 introduces quick setting, minimal to disable all features
leaving only the core of the webkit (enough for surfing? need to test)
- patch #3 exposes that optimize size feature

Besides disk and RAM savings I see a benefit of reducing unwanted/needed
features in terms of
?security and privacy (less code to exploit by bad guys).

-S-

Thomas Petazzoni kirjoitti 30.11.2017 klo 10:02:
> Hello,
>
> On Thu, 30 Nov 2017 01:49:28 +0200, Stefan Fr?berg wrote:
>> Update: I just tried it and the results are these:
>>
>> Stock, uclibc qt5webkit size on target:
>> 32MB
>>
>> Modified uclibc qt5webkit build with "minimal" and
>> "use_cross_platform_context_menus" (needed for successfull build)
>> settings, size on target:
>> 22 MB
>>
>> So it would save about 10 MB
> I think that's an interesting space saving (and perhaps build time
> saving as well ?). So yes, you can go ahead and submit patches to
> implement more fine-grained configuration for qt5webkit :-)
>
> Thanks!
>
> Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Putting qtwebkit on a diet
  2017-12-01 14:05     ` Stefan Fröberg
@ 2017-12-01 14:10       ` Thomas Petazzoni
       [not found]         ` <7264cc95-a3cd-a416-de49-cf06fe865ef1@petroprogram.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-12-01 14:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 1 Dec 2017 16:05:03 +0200, Stefan Fr?berg wrote:

> It get's even better. When enabling "optimize for size" feature and ARM
> thumb2 (needed for optimize size on ARM platforms)
> I could reduce QtWebkit size down to 7.6 MB ! :-)
> 
> I try to collect as many feature settings that I can find and then make
> patch serie of 3 where:
> - patch #1 let's user to disable/enable features individually
> - patch #2 introduces quick setting, minimal to disable all features
> leaving only the core of the webkit (enough for surfing? need to test)

OK. I'm not sure yet about patch #2, but I'll have to see the code to
really decide.

> - patch #3 exposes that optimize size feature

Is it just -Os ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Putting qtwebkit on a diet
       [not found]         ` <7264cc95-a3cd-a416-de49-cf06fe865ef1@petroprogram.com>
@ 2017-12-01 15:06           ` Thomas Petazzoni
  2017-12-02  1:12             ` Stefan Fröberg
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-12-01 15:06 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 1 Dec 2017 16:51:37 +0200, Stefan Fr?berg wrote:

> I guess on non-ARM the optimize for size feature is doing just? -Os but
> on ARM it also needs thumb enabled.
> Otherwise it nags "Not supported ARM architecture" (this while building
> for raspberry pi3)

Then we don't want additional options for this, because we already have
top-level options to select Thumb2 and -Os.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Putting qtwebkit on a diet
  2017-12-01 15:06           ` Thomas Petazzoni
@ 2017-12-02  1:12             ` Stefan Fröberg
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Fröberg @ 2017-12-02  1:12 UTC (permalink / raw)
  To: buildroot

Hi

I tried with just thumb and -Os options (did not give either
"optimize_size" or "minimal" this time for QtWebkit)
and I got it down to 12 MB.

I also think that "optimize_size" and "minimal" options for QtWebkit are
the same.
At least did not see any change in 7.6 MB size no matter what
combination of those switches used.

So to sum it all:

- Doing thumb/-Os build without doing anything extra (like HTML5 video
supports that needs gst-plugins-base 1.0)
? and just the bare minimum dependencies for QtWebkit gives around 12 MB
for raspberry pi 3 target

- Using either optimize_size/minimal for QtWebkit (qmake
WEBKIT_CONFIG="minimal" or qmake WEBKIT_CONFIG="optimize_size")
? with thumb & -Os gives 7.6 MB both and they *seem* to be equivalent
(at least they seem to disable same features both from core of QtWebkit)

So I think it will be just 2 patches then ...
patch #1: introduce? optimize_size/minimal build option
patch #2: expose all the features that can be individually enabled/disabled

Before submitting patches, I will still try the minimal build and test
the provided minibrowser and see what works and what not
so that I know if it makes sense to have patch #1.

-S-

Thomas Petazzoni kirjoitti 01.12.2017 klo 17:06:
> Hello,
>
> On Fri, 1 Dec 2017 16:51:37 +0200, Stefan Fr?berg wrote:
>
>> I guess on non-ARM the optimize for size feature is doing just? -Os but
>> on ARM it also needs thumb enabled.
>> Otherwise it nags "Not supported ARM architecture" (this while building
>> for raspberry pi3)
> Then we don't want additional options for this, because we already have
> top-level options to select Thumb2 and -Os.
>
> Best regards,
>
> Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-02  1:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-29 22:12 [Buildroot] Putting qtwebkit on a diet Stefan Fröberg
2017-11-29 23:49 ` Stefan Fröberg
2017-11-30  8:02   ` Thomas Petazzoni
2017-12-01 14:05     ` Stefan Fröberg
2017-12-01 14:10       ` Thomas Petazzoni
     [not found]         ` <7264cc95-a3cd-a416-de49-cf06fe865ef1@petroprogram.com>
2017-12-01 15:06           ` Thomas Petazzoni
2017-12-02  1:12             ` Stefan Fröberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox