diff options
author | Petr Kulhavy <brain@jikos.cz> | 2016-11-15 09:39:31 +0100 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2018-03-21 17:47:26 -0400 |
commit | 589019d8f5072d4470ea2ed76cfffa75f45e9426 (patch) | |
tree | 788ebc22542bc693ac9b04c4e9754c5df97a58c0 | |
parent | 850e678813f11b439994d434f2800bfbbb140864 (diff) |
udpsrc: optimize GstUdpSrc object for cache performance
Optimize GstUdpSrc for cache performance.
Move the hot properties, which are used by the read function, to the top:
@used_socket, @addr, @cancellable, @skip_first_bytes, @timeout,
@retrieve_sender_address.
Remove the unused property @ttl.
Where needed reorder so that holes are avoided (the 64-bit @timeout)
https://bugzilla.gnome.org/show_bug.cgi?id=772841
-rw-r--r-- | gst/udp/gstudpsrc.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gst/udp/gstudpsrc.h b/gst/udp/gstudpsrc.h index 96f844b36..6c512562e 100644 --- a/gst/udp/gstudpsrc.h +++ b/gst/udp/gstudpsrc.h @@ -47,32 +47,32 @@ typedef struct _GstUDPSrcClass GstUDPSrcClass; struct _GstUDPSrc { GstPushSrc parent; + /* our sockets */ + GSocket *used_socket; /* hot */ + GInetSocketAddress *addr; /* hot */ + + GCancellable *cancellable; /* hot */ + /* properties */ + gint skip_first_bytes; /* hot */ + guint64 timeout; /* hot */ + gboolean retrieve_sender_address; /* hot */ gchar *address; gint port; gchar *multi_iface; - gint ttl; GstCaps *caps; gint buffer_size; - guint64 timeout; - gint skip_first_bytes; GSocket *socket; gboolean close_socket; gboolean auto_multicast; gboolean reuse; gboolean loop; - gboolean retrieve_sender_address; /* stats */ guint max_size; - /* our sockets */ - GSocket *used_socket; - GInetSocketAddress *addr; gboolean external_socket; - gboolean made_cancel_fd; - GCancellable *cancellable; /* memory management */ GstAllocator *allocator; |