Web lists-archives.com

[Discuss] Make a thinner Glib/GTK+ to fit tiny device better

Hi all,

I'm thinking and interested in the idea of running Glib/GTK+ based
applications on tiny devices, e.g. wearable devices.

I notice Tizen employs EFL because it is lightweight and fast. But
when went through the code, it seems terrible and in a mess.

Glib is clean and elegant, and with the incoming GSK, GTK+ will be
polished. I'm thinking how to make Glib/GTK+ thinner ( to make memory
footprint comparable with EFL's , though I haven't found any 'GTK+ vs
EFL' benchmark yet...)

And here are some rough thoughts:
1. Make Glib/GTK+ more modular for building, e.g. a configuration
system similar to linux kernel's. Autoconf do support select in/out
optional modules, but will be too many configure args with a huge

2. I notice EFL use some "COW" logic[1], but we already have a much
clean implementation in GStreamer, that's
gst_mini_object_make_writable[2]. Then we may merge GstMiniObject back
to glib?

3. Remove extra layers. E.g. the malloc implementations in nowadays
are very powerfull(e.g. jemalloc), hence GSlice can be retired(which
otherwise introduces an extra cache layer).    Also I'm thinking about
providing APIs to make GTK+(also GIO) easily integrated to other event
loop, then we use epoll() on Linux, kqueue() onBSD or even
libdispatch[3] - client code can use simpler event loop(e.g. no locks,
no recursive main loop support)

1. https://docs.enlightenment.org/stable/efl/group__Eina__Cow__Group.html
2. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#gst-mini-object-make-writable
3. https://github.com/cee1/cee1.archive/blob/master/documents/libdispatch-event.pdf

- Regards,

- cee1
gtk-devel-list mailing list