aboutsummaryrefslogtreecommitdiffstats
path: root/epan/frame_data.h
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-07-12 10:19:13 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-07-12 10:19:13 +0000
commit27572c22f4c47b845c90700f46e27d239515531c (patch)
tree8a20bb03d20a569e22078dd31657e0eaa9bd66e3 /epan/frame_data.h
parent052a2b965a424465fb87c83a5f2009b35471be8b (diff)
From Kovarththanan Rajaratnam via bug 3702:
This patch optimizes the data source name processing in add_new_data_source() by delaying it. We now simply store the constant string and lazily compute the name when needed. This gives a performance boost because we only need the name if we have multiple data sources. svn path=/trunk/; revision=29066
Diffstat (limited to 'epan/frame_data.h')
-rw-r--r--epan/frame_data.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/frame_data.h b/epan/frame_data.h
index f8332803e9..197cf332bf 100644
--- a/epan/frame_data.h
+++ b/epan/frame_data.h
@@ -67,7 +67,8 @@ typedef struct _frame_data {
*/
typedef struct {
tvbuff_t *tvb;
- char *name;
+ gboolean name_initialized;
+ const char *name;
} data_source;
/* Utility routines used by packet*.c */