After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720248 - Search provider should link to fewer dependencies
Search provider should link to fewer dependencies
Status: RESOLVED WONTFIX
Product: epiphany
Classification: Core
Component: General
git master
Other Mac OS
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-11 11:54 UTC by Carlos Garcia Campos
Modified: 2016-08-21 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Install libephymain.so (1.27 KB, patch)
2016-08-07 21:45 UTC, Michael Catanzaro
committed Details | Review
Install libephymisc.so (1.02 KB, patch)
2016-08-07 21:45 UTC, Michael Catanzaro
committed Details | Review
Link libephyhistory.la directly into libephymisc.la (1.50 KB, patch)
2016-08-21 21:00 UTC, Michael Catanzaro
committed Details | Review

Description Carlos Garcia Campos 2013-12-11 11:54:22 UTC
We are currently using almost the same libs than ephy itself. I should only link to a few external libs, like glib, but also it should use fewer internal deps which will also reduce the binary size.
Comment 1 Michael Catanzaro 2016-08-07 21:38:34 UTC
(In reply to Carlos Garcia Campos from comment #0)
> We are currently using almost the same libs than ephy itself. I should only
> link to a few external libs, like glib,

I don't really mind overlinking so much; avoiding that requires compiling the same source files multiple times, which we currently do not do anymore. If we give up on this goal...

> but also it should use fewer
> internal deps which will also reduce the binary size.

...then this becomes easy. By installing libephymain as a private shared library, we cut our installed size by roughly half. Current size on disk (without stripping debuginfo):

prefix/bin/epiphany                           2.8 MB
prefix/libexec/epiphany-search-provider       2.8 MB
prefix/libexec/epiphany/ephy-profile-migrator 320.2 kB
prefix/lib/epiphany/libephywebextension.so    643.3 kB
                                       Total: 6.54 MB

With libephymain as private shared lib:

prefix/bin/epiphany                           107.8 kB
prefix/libexec/epiphany-search-provider       122.9 kB
prefix/libexec/ephy-profile-migrator          320.2 kB
prefix/lib/epiphany/libephywebextension.so    643.3 kB
prefix/lib/epiphany/libephymain.so            2.8 MB
                                       Total: 3.97 MB

If we additionally install libephymisc:

jhbuild/bin/epiphany                           107.8 kB
jhbuild/libexec/epiphany-search-provider       122.9 kB
jhbuild/libexec/ephy-profile-migrator          320.2 kB
jhbuild/lib/epiphany/libephywebextension.so    214.7 kB
jhbuild/lib/epiphany/libephymain.so            2.5 MB
jhbuild/lib/epiphany/libephymisc.so            461.6 kB
                                        Total: 3.27

I tried installing libephyhistory as well (which is static linked into both ephy-profile-migrator.so and libephymain.so in the scheme above), but I didn't get any space savings. It's still maybe worthwhile, if we want to avoid unnecessary binary duplication. (The other internal libraries are all static linked to exactly once in the scheme above.)

Thoughts?
Comment 2 Michael Catanzaro 2016-08-07 21:45:11 UTC
Created attachment 332895 [details] [review]
Install libephymain.so

Instead of static linking it into both the epiphany and
epiphany-search-provider binaries, install it as a private shared
library. This cuts our installed size from 6.6 MB to 4.0 MB (before
debuginfo is stripped) total. In particular, the epiphany and
epiphany-search-provider binaries are now 0.1 MB apiece, from 2.8 MB
apiece. The installed library takes 2.8 MB.
Comment 3 Michael Catanzaro 2016-08-07 21:45:14 UTC
Created attachment 332896 [details] [review]
Install libephymisc.so

For additional space savings. This cuts our installed size from 4.0 MB
down to 3.3 MB (before stripping debuginfo).
Comment 4 Michael Catanzaro 2016-08-21 21:00:31 UTC
Created attachment 333842 [details] [review]
Link libephyhistory.la directly into libephymisc.la

This way, we don't need separate static copies of libephyhistory.la in
both libephymain.la and epiphany-profile-migrator.
Comment 5 Michael Catanzaro 2016-08-21 21:00:48 UTC
Attachment 332895 [details] pushed as 32e99b7 - Install libephymain.so
Attachment 332896 [details] pushed as 7e705f6 - Install libephymisc.so
Attachment 333842 [details] pushed as 74b907c - Link libephyhistory.la directly into libephymisc.la