[Webkit-unassigned] [Bug 137485] [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 7 23:23:13 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137485





--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-10-07 23:23:09 PST ---
(In reply to comment #5)
> The implementation looks OK.

Thanks for looking at it.

> Still, in my experience the main bottleneck in GMainLoopSource is the constant creation and destruction of GSource objects. I'd prefer to see that addressed first, and work on thread-safety simplification from there.

Constant creation and destruction of GSources is the normal way glib main loop works, so I'm surprised that causes problems. g_idle and g_timeout functions in glib always create a new GSource, so there shouldn't be differences in that regard between using glib functions directly or GMainLoopSource. 
I haven't measured but I would say that creating a GCancellable (which is a GObject), and the mutex lock/unlock on every schedule is a lot more demanding than creating and destroying the sources.

> I'll dump my current approach towards that either in a bug or in a pastebin, and we can discuss it from there.

Ok, I think any optimization in the way glib sources work should be done in glib itself for the benefit of everybody.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list