Hello, I was looking for a tiny gstreamer core, but found that around 2.7+ MB is consumed by Glib only. And looks like gstreamer is tightly coupled with glib. Is there any in-progress task/bug for decoupling the glib with gstreamer ?
Also, will it a better idea to decouple glib and then integrate with musl instead of glibc to reduce memory footprint. Appreciate any suggestions or advice on this ? Regards Murali _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
On Tue, 2019-11-19 at 05:59 +0000, Muralidhar S R wrote: > Hello, > > > > I was looking for a tiny gstreamer core, but found that around 2.7+ > MB is consumed by Glib only. It depends under what circumstances. Also some parts can be compiled out if needed. > > And looks like gstreamer is tightly coupled with glib. > > > > Is there any in-progress task/bug for decoupling the glib with > gstreamer ? > > > > Also, will it a better idea to decouple glib and then integrate with > musl instead of glibc to reduce memory footprint. > > Appreciate any suggestions or advice on this ? glib and glibc are not the same thing. For example The Alpine distribution uses musl instead of glibc and gstreamer works fine on there. GStreamer use *glib* for 3 things: * libglib: platform abstraction (such as threading primitives) and basic types (linked list, hash tables, ...). * libgobject: Dynamic object-based instropectable system. This allows us to do "object-based" programming in C with types loaded at runtime. * libgio: i/o abstraction so that we don't have to care about accessing socket/files/... on any platform. This is mostly used for some networking-related components, for which we also have alternative implementations (curl) or for which we could look at implementing native plugins. Everything else in glib is not used that much. You could build a glib with all optional parts stripped out and would gain a lot. Note that a good part of the memory usage of glib is due to unicode/iconv support. If you're targetting an "international" system you will need support for that one way or another. Converting GStreamer to *not* use glib/gobject would take too much effort for very little gain (glib/gobject has been optimized a lot over the years). If your goal is reducing the memory footprint it would be more beneficial to look at stripping down glib to your requirements. In the end, it all depends on your requirements. Best Regards, Edward > > Regards > Murali > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le mardi 19 novembre 2019 à 10:34 +0100, Edward Hervey a écrit :
> Hi, > > On Tue, 2019-11-19 at 05:59 +0000, Muralidhar S R wrote: > > Hello, > > > > > > > > I was looking for a tiny gstreamer core, but found that around 2.7+ > > MB is consumed by Glib only. Just an add-on, we found that GLib UTF-8 tables takes a lot of space. If you don't use anything else then ansi (and C locales), you maybe managed to reach slower size my commenting out these tables. > > It depends under what circumstances. Also some parts can be compiled > out if needed. > > > And looks like gstreamer is tightly coupled with glib. > > > > > > > > Is there any in-progress task/bug for decoupling the glib with > > gstreamer ? > > > > > > > > Also, will it a better idea to decouple glib and then integrate with > > musl instead of glibc to reduce memory footprint. > > Appreciate any suggestions or advice on this ? > > glib and glibc are not the same thing. For example The Alpine > distribution uses musl instead of glibc and gstreamer works fine on > there. > > GStreamer use *glib* for 3 things: > * libglib: platform abstraction (such as threading primitives) and > basic types (linked list, hash tables, ...). > * libgobject: Dynamic object-based instropectable system. This allows > us to do "object-based" programming in C with types loaded at runtime. > * libgio: i/o abstraction so that we don't have to care about > accessing socket/files/... on any platform. This is mostly used for > some networking-related components, for which we also have alternative > implementations (curl) or for which we could look at implementing > native plugins. > > Everything else in glib is not used that much. You could build a glib > with all optional parts stripped out and would gain a lot. Note that a > good part of the memory usage of glib is due to unicode/iconv support. > If you're targetting an "international" system you will need support > for that one way or another. > > Converting GStreamer to *not* use glib/gobject would take too much > effort for very little gain (glib/gobject has been optimized a lot over > the years). If your goal is reducing the memory footprint it would be > more beneficial to look at stripping down glib to your requirements. > > In the end, it all depends on your requirements. > > Best Regards, > > Edward > > > Regards > > Murali > > _______________________________________________ > > gstreamer-devel mailing list > > [hidden email] > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Edward,
Thank you for your reply. Your suggestion was really helpful, after strip & removal of some in iconv, was able to reduce the size. Will now try with commenting of UTF-8 tables. Thanks again !! Regards Murali -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
I gave a talk with some more tricks a couple years ago that can be useful to you. https://youtu.be/RE3ylldz-Fs Olivier On November 19, 2019 11:35:33 a.m. GMT-03:00, Krish <[hidden email]> wrote: >Hi Edward, >Thank you for your reply. > >Your suggestion was really helpful, after strip & removal of some in >iconv, >was able to reduce the size. Will now try with commenting of UTF-8 >tables. > >Thanks again !! > >Regards >Murali > > > >-- >Sent from: http://gstreamer-devel.966125.n4.nabble.com/ >_______________________________________________ >gstreamer-devel mailing list >[hidden email] >https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Olivier,
Your presentation on tiny gstreamer was great. We have referred and applied most of the suggestions you had mentioned in the presentation. Thank you Regards Murali -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |