Can you also try webkitgtk please? It's directly in core, no extra
layer or special setup needed.


Alex

On Tue, 14 May 2024 at 17:43, Khem Raj <raj.k...@gmail.com> wrote:
>
> On Tue, May 14, 2024 at 8:25 AM Randy MacLeod
> <randy.macl...@windriver.com> wrote:
> >
> > On 2024-05-07 3:56 p.m., Alexander Kanavin via lists.openembedded.org wrote:
> >
> > On Tue, 7 May 2024 at 18:13, Khem Raj <raj.k...@gmail.com> wrote:
> >
> > Firstly I am inclined towards removing it if we can, since I think it 
> > should be
> > packages to decide to use it, then they can maintain it better from testing 
> > POV,
> > However, there is something
> > to consider w.r.t. to this option. This does help in optimizing loading DSOs
> > by reducing the number of PLTs and improves loading time for DSOs which 
> > might
> > be quite meaningful for embedded devices that we target. However, we only
> > enable hidden visibility only for inlines so it won't be full benefits but 
> > we do
> > have better default compatibility.
> >
> > Since we have had this option for a long time and it still seems
> > relevant, I would
> > think it would make sense to do some benchmarking on a sizeable C++ program
> > perhaps chromium or webkit, and see the difference in DSOs sizes with
> > and without
> > this option and also benchmark the loading time of the resulting
> > chromium package.
> >
> > maybe we will find that the gains are not as significant, in that case
> > we might drop
> > it from defaults.
> >
> > I digged deeper and this is where I think it originated:
> > https://git.openembedded.org/openembedded/commit/?id=ddd6d1fd26416a3766d754eeda4237a680a65520
> >
> > Ah the simpler times of oe-classic, when one could bundle four
> > unrelated changes into one commit and explain none of them.
> >
> > Benchmarking I have no time for right now, just wanted to point out
> > that adding the flag was never justified in commit log. Can you
> > experiment with webkit?
> >
> >
> > I tried to build chromium with and without this flag but ran into build 
> > problems - sigh.
> >
> > I pulled out the next most-bloated single executable that I could think of: 
> > nodejs
> >
> > The bottom line is that the flag reduces the nodejs executable size  by ~6%.
> > Actual sizes:
> >
> > >>> 37333922 - 35245092
> > 2088830
> >
> > so 2 MB out of 37 MB !
> >
> > Chromium has been updated over the weekend so I'll try that next.
> >
> > What else would people like to see to assess the utility of this compiler 
> > option?
> >
> Thanks for taking this up.
> I think chromium and nodejs are large enough packages to give us a
> good idea of its benefits.
> We should add a comment to config files where this option is added for
> future reference.
>
> >
> > ../Randy
> >
> > Original build:
> >
> > ❯ size 
> > ../chromium-poky-m-aab1335523/tmp/work/core2-64-poky-linux/nodejs/20.12.2/packages-split/nodejs/usr/bin/node
> >    text    data     bss     dec     hex filename
> > 35245092         628548  154792 36028432        225c010 
> > ../chromium-poky-m-aab1335523/tmp/work/core2-64-poky-linux/nodejs/20.12.2/packages-split/nodejs/usr/bin/node
> >
> > With this patch:
> >
> > ❯ git diff
> > diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_20.12.2.bb 
> > b/meta-oe/recipes-devtools/nodejs/nodejs_20.12.2.bb
> > index d86c38f2f..50cff533f 100644
> > --- a/meta-oe/recipes-devtools/nodejs/nodejs_20.12.2.bb
> > +++ b/meta-oe/recipes-devtools/nodejs/nodejs_20.12.2.bb
> > @@ -42,6 +42,8 @@ S = "${WORKDIR}/node-v${PV}"
> >
> >  CVE_PRODUCT += "node.js"
> >
> > +CXXFLAGS:remove = "-fvisibility-inlines-hidden"
> > +
> >  # v8 errors out if you have set CCACHE
> >  CCACHE = ""
> >
> >
> >
> > ❯ size 
> > tmp/work/core2-64-poky-linux/nodejs/20.12.2/packages-split/nodejs/usr/bin/node
> >    text    data     bss     dec     hex filename
> > 37333922         628548  154792 38117262        2459f8e 
> > tmp/work/core2-64-poky-linux/nodejs/20.12.2/packages-split/nodejs/usr/bin/node
> >
> > ❯ python3
> > Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> 35245092.0/37333922.0*100.0
> > 94.40500786389386
> >
> >
> >
> >
> > Alex
> >
> >
> > 
> >
> >
> > --
> > # Randy MacLeod
> > # Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199263): 
https://lists.openembedded.org/g/openembedded-core/message/199263
Mute This Topic: https://lists.openembedded.org/mt/105955497/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to