glib/girepository
Barnabás Pőcze 7a528d0ff0 girepository: gi_object_info_find_signal(): Avoid repeated allocations
Previously `gi_object_info_find_signal()` used `gi_object_info_get_signal()`
to retrieve the *i*th signal and compare its name to the desired name.
However, `gi_object_info_get_signal()` returns an allocated object.
If the names were not matching, the allocated object was simply dropped,
and this resulted in a lot of unnecessary allocations compared to the
desired number of allocations, which is one.

To avoid much of the overhead pertaining to the creation of these allocated
`GISignalInfo` objects, introduce a new function that inspects the signal
blobs directly and returns an allocated `GISignalInfo` object just for the
matching signal. The function is largely a copy-and-paste of `gi_base_info_find_vfunc()`,
which does the same thing, only for virtual functions.

See https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/504
2024-11-23 19:25:17 +01:00
..
cmph Remove unused cmph files 2024-04-12 15:26:22 +01:00
compiler girepository/compiler: Free the parser when not needed 2024-05-16 22:51:12 +01:00
decompiler girepository: Provide placeholders for positional parameters 2024-02-28 11:27:15 +00:00
inspector girepository: Combine input file validation code paths in utilities 2024-02-26 18:10:56 +00:00
introspection build: Bump Meson dependency to 1.4.0 2024-09-12 19:15:05 +01:00
tests girepository: gi_object_info_find_signal(): Avoid repeated allocations 2024-11-23 19:25:17 +01:00
gdump.c Dump pointer types in the introspection blob 2024-05-31 18:40:21 +01:00
gi-dump-types.c girepository: Replace tabs with spaces in indentation 2024-01-16 17:30:37 +01:00
giarginfo.c girepository: Rename gi_arg_info_load_type() to gi_arg_info_load_type_info() 2024-02-05 15:13:46 +00:00
giarginfo.h girepository: Rename gi_arg_info_load_type() to gi_arg_info_load_type_info() 2024-02-05 15:13:46 +00:00
gibaseinfo-private.h gibaseinfo: Remove an unused private macro 2024-02-14 11:52:02 +00:00
gibaseinfo.c gibaseinfo: fully initialize GTypeInfo before registering it 2024-09-18 01:48:36 +01:00
gibaseinfo.h girepository: Make GIInfoType private 2024-02-08 12:56:02 +00:00
gicallableinfo.c girepository: Fix API version ‘since’ numbers 2024-08-26 12:08:13 +01:00
gicallableinfo.h girepository: Fix API version ‘since’ numbers 2024-08-26 12:08:13 +01:00
gicallbackinfo.c gicallbackinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:15 +00:00
gicallbackinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giconstantinfo.c girrepository: Replace usage of gsize with standard size_t 2024-01-16 18:40:42 +01:00
giconstantinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gienuminfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gienuminfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gifieldinfo.c girepository: Fix various implicit conversions from size_t to smaller types 2024-04-25 00:41:34 +01:00
gifieldinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giflagsinfo.c gienuminfo: Split out GIFlagsInfo as a derived type 2024-01-18 13:15:22 +00:00
giflagsinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gifunctioninfo.c girepository: Add APIs for sync, async, and finish function annotations 2024-08-26 12:07:25 +01:00
gifunctioninfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giinterfaceinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
giinterfaceinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
ginvoke.c girrepository: Use standard int sized types instead of g[u]int* 2024-01-16 18:40:42 +01:00
giobjectinfo.c girepository: gi_object_info_find_signal(): Avoid repeated allocations 2024-11-23 19:25:17 +01:00
giobjectinfo.h girepository: Fix declaration of ‘find using interfaces’ methods 2024-02-05 18:40:03 +00:00
gipropertyinfo.c gipropertyinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:15 +00:00
gipropertyinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giregisteredtypeinfo.c gibaseinfo: Stop building GIBoxedInfo instances 2024-02-12 13:16:07 +00:00
giregisteredtypeinfo.h gibaseinfo: Stop building GIBoxedInfo instances 2024-02-12 13:16:07 +00:00
girepository-autocleanups.h girepository: Add g_autoptr() and g_auto() support 2024-02-14 11:54:48 +00:00
girepository-private.h girepository: Don't assume a bitfield has a fixed size 2024-05-15 12:09:21 +01:00
girepository.c girepository: Fix type of precondition return values 2024-06-04 17:27:28 +01:00
girepository.h girepository: Add g_autoptr() and g_auto() support 2024-02-14 11:54:48 +00:00
girffi.c girffi: Fix ffi_cif leaks on error return paths 2024-04-12 18:45:18 +01:00
girffi.h girepository: Add g_autoptr() and g_auto() support 2024-02-14 11:54:48 +00:00
girmodule-private.h girepository/girparser,girmodule: Use a GPtrArray to hold the dependencies 2024-05-16 22:51:12 +01:00
girmodule.c girepository/girparser,girmodule: Use a GPtrArray to hold the dependencies 2024-05-16 22:51:12 +01:00
girnode-private.h girepository: Add APIs for sync, async, and finish function annotations 2024-08-26 12:07:25 +01:00
girnode.c Merge branch 'wfloat-conversion' into 'main' 2024-09-17 17:57:11 +00:00
giroffsets.c girnode: Improve int types in GIIrNodeField 2024-01-26 09:29:30 +00:00
girparser-private.h girparser: Don't rely on gi-compile-repository exporting debug level 2024-02-14 10:36:34 +00:00
girparser.c gir: Ignore function-inline and method-inline elements 2024-10-03 18:35:38 +02:00
girwriter-private.h girwriter: Take the GIRepository as a parameter 2024-02-14 11:13:04 +00:00
girwriter.c girepository: Coding style fixes 2024-08-26 12:07:49 +01:00
gisignalinfo.c gisignalinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:16 +00:00
gisignalinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gistructinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gistructinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gitypeinfo.c girepository: Make GIInfoType private 2024-02-08 12:56:02 +00:00
gitypeinfo.h girepository: Make GIInfoType private 2024-02-08 12:56:02 +00:00
gitypelib-internal.h girepository: Make _blob_is_registered_type static inline 2024-09-25 10:45:05 +02:00
gitypelib.c gitypelib: Fix iterating through typelib prefixes 2024-05-16 22:47:29 +01:00
gitypelib.h gitypelib: Add boxed type 2024-02-07 21:07:18 +00:00
gitypes.h girepository: Fix hole in GIFunctionInfoFlags 2024-08-26 12:08:28 +01:00
giunioninfo.c Merge branch 'gi-info-new' into 'main' 2024-02-08 10:34:40 +00:00
giunioninfo.h giunioninfo: Split success and return value for get_discriminator_offset() 2024-02-06 13:34:17 +00:00
giunresolvedinfo.c giunresolvedinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:16 +00:00
giunresolvedinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
givalueinfo.c girepository: Split GIValueInfo out of gienuminfo.c 2024-01-18 13:15:22 +00:00
givalueinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
givfuncinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
givfuncinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gthash.c docs: spelling and grammar fixes 2024-04-01 11:01:06 +00:00
meson.build girepository: add support for relocations 2024-06-04 13:00:42 +02:00