[gobject] Grow gvalue transform array exponentially
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 6 Jun 2009 03:28:17 +0000 (23:28 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 21 Dec 2009 16:12:17 +0000 (17:12 +0100)
Bug 589176 - Grow gvalue transform array exponentially

Reduces about 180 realloc calls during g_type_init().

gobject/gvalue.c

index 85187b7..7be9f71 100644 (file)
@@ -134,7 +134,7 @@ static GBSearchArray *transform_array = NULL;
 static GBSearchConfig transform_bconfig = {
   sizeof (TransformEntry),
   transform_entries_cmp,
-  0,
+  G_BSEARCH_ARRAY_ALIGN_POWER2,
 };