Bug 121545 - [GTK] Reduce the binary size by compressing the text based web inspector resources
Summary: [GTK] Reduce the binary size by compressing the text based web inspector reso...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-18 00:50 PDT by Carlos Garcia Campos
Modified: 2014-04-15 06:14 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.14 KB, patch)
2014-04-11 08:54 PDT, Carlos Garcia Campos
gns: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2013-09-18 00:50:55 PDT
Now that web inspector resources are compiled as gresources, we might reduce the binary size a bit by compiling the text based resources compressed. We should check it doesn't affect the performance though.
Comment 1 Carlos Garcia Campos 2014-03-21 02:40:56 PDT
I've tried a patch for this (on top of patch attached to bug #130343), and these are the results:

Before:

-rw-r--r-- 1 cgarcia cgarcia 28M mar 21 10:31 InspectorGResourceBundle.c
-rwxr-xr-x 1 cgarcia cgarcia  59M mar 21 10:30 libwebkit2gtk-3.0.so.25.7.0
-rwxr-xr-x 1 cgarcia cgarcia  55M mar 21 10:30 libwebkitgtk-3.0.so.0.22.0
-rwxr-xr-x 1 cgarcia cgarcia  47M mar 21 10:30 WebKitPluginProcess

After:

-rw-r--r-- 1 cgarcia cgarcia 12M mar 21 10:32 InspectorGResourceBundle.c
-rwxr-xr-x 1 cgarcia cgarcia  56M mar 21 10:33 libwebkit2gtk-3.0.so.25.7.0
-rwxr-xr-x 1 cgarcia cgarcia  52M mar 21 10:33 libwebkitgtk-3.0.so.0.22.0
-rwxr-xr-x 1 cgarcia cgarcia  45M mar 21 10:33 WebKitPluginProcess

As you can see, one problem of compiling the resources in WEbCore is that all those end up in the plugin proces binary. My currently installed plugin process is 35MB, 10MB less than the compressed version including the inspector resources. So, maybe we should re-consider compiling them in WebCore, even if we have to duplicate some cmake code. 

I haven't noticed any performance regression when loading the compressed resources. I'll submit the patch as soon as patch for bug #130343 lands.
Comment 2 Carlos Garcia Campos 2014-04-11 08:54:21 PDT
Created attachment 229135 [details]
Patch

Before:

-rwxr-xr-x 1 cgarcia cgarcia  58M abr 11 15:38 libwebkit2gtk-3.0.so.25.7.0

After:

-rwxr-xr-x 1 cgarcia cgarcia  55M abr 11 17:48 libwebkit2gtk-3.0.so.25.7.0
Comment 3 Gustavo Noronha (kov) 2014-04-15 05:23:09 PDT
Comment on attachment 229135 [details]
Patch

Nice!
Comment 4 Carlos Garcia Campos 2014-04-15 06:14:18 PDT
Committed r167306: <http://trac.webkit.org/changeset/167306>