[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
Thu Oct 9 06:50:30 PDT 2014


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





--- Comment #10 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-10-09 06:50:26 PST ---
(In reply to comment #9)
> (In reply to comment #8)
> > Thanks for measuring, as I said both optimizations are compatible. My point was that the persistent source optimization could be applied anyway, but it could be done using the same API, and transparently to the user. Could you measure again with this patch and the one I attached to bug #137513?
> 
> Here's the profile:
> http://people.igalia.com/zdobersek/gms-optional-thread-safety-simplified.png
> 
> Not really better than without the persistent source implementation, pretty much the same actually. Though the time is now spent in additional mutex locking via g_source_set_ready_time(), g_main_context_get_default() and GSource ref-unrefing, and in string comparison.

hmm, g_source_set_ready_time() is called mostly in the same places than your patch, so that shouldn't make any difference. The string comparison was to check if the source name changed, to avoid dealloc/alloc and mutex lock/unlock that happens in g_source_set_name.
I tried to make it transparent for the users, but if we want to avoid all those checks, I guess we need specific API for persistent sources, or even a different class like in your patch. Thanks again for measuring

-- 
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