[gstreamer-bugs] [Bug 598896] [GstRegistry] Cache lists of ElementFactory and TypeFindFactory
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Oct 22 02:09:01 PDT 2009
https://bugzilla.gnome.org/show_bug.cgi?id=598896
GStreamer | gstreamer (core) | git
--- Comment #11 from Edward Hervey <bilboed at gmail.com> 2009-10-22 09:08:59 UTC ---
(In reply to comment #8)
> Review of attachment 145766 [details]:
>
> What Tim said, use the GObject instance private stuff here. Not that it matters
> much (because there's usually only one GstRegistry instance) but it's cleaner
> ;)
That private data code in gobject/gtype.c is ugly/slow beyond belief. Until
that's fixed, I have no intention of adding that in optimisations.
I could definitely have a look at speeding up that gtype code though.
(In reply to comment #9)
> Review of attachment 145923 [details]:
>
> - Use g_list_alloc() instead of GSlice, you never know if GLib will change
> allocations of list nodes again in the future
> - You could use g_list_append() instead of the manual twiddling with the next
> and prev pointers... unless the function call is too expensive for you :)
> g_list_append() runs in O(1) if you append a new node to the last element btw
> but you know that ;)
I'm just wondering if it's worth it. Having to call two external functions
(which do checks) over a list.. is basically gonna kill the optimisation.
I'm either completely removing it or keeping as is.
(In reply to comment #10)
> Review of attachment 145924 [details]:
>
> Looks good to me but to reduce code duplication better make the get-or-create
> function a bit more generic:
> GList * gst_registry_get_element_factory_list (GstRegistry *registry, GList
> **list, guint32 *cookie, GType type)
Yah, I thought about that... I'll try to write generic new API functions for
requesting lists with one already present.
Thanks for the review.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list