glib/gobject
Thomas Haller 50b5ea1781 gobject: rework toggle_refs_check_and_ref() to use g_datalist_id_update_atomic()
Note that OBJECT_HAS_TOGGLE_REF() is no longer used. This is good and
bad.

What we soon will do, is drop the OPTIONAL_BIT_LOCK_TOGGLE_REFS lock,
and only call g_datalist_id_update_atomic(). This way, we only need to
take the GData lock.

However, g_datalist_id_update_atomic() also needs to do a linear search
for quark_toggle_refs key. Previously, with OBJECT_HAS_TOGGLE_REF() we
didn't require this.

So the new approach is only faster, if searching the GQuark key is
reasonably fast. As GData tracks the objects in a linear list, adding
many keys can degrade and result in bad performance.

But the solution for that problem is to improve GData so that it's fast
enough for our purposes. Saying we cannot use it because it's too slow
to find the key, is wrong.
2025-01-16 21:33:11 +01:00
..
2023-10-16 23:34:04 +01:00
2023-12-31 09:09:48 +00:00
2022-10-13 20:53:56 -04:00
2023-10-16 23:35:05 +01:00
2023-12-31 09:09:48 +00:00
2022-10-13 20:53:56 -04:00
2023-10-16 23:34:24 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00