summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-03-05 19:12:43 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-03-05 19:12:43 +0000
commit7aef4921057cd8310981be37070753602c79b303 (patch)
treee892adc01388235eed1fb7872d3b0885c056cf09 /cpp/include
parent5c7af69acdf2c9702e765418b986d4fb15e7aea3 (diff)
downloadqpid-python-7aef4921057cd8310981be37070753602c79b303.tar.gz
QPID-3883: Using application headers in messages causes a very large slowdown
Cache the size of a field table to prevent recomputation git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1297184 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/qpid/framing/FieldTable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/include/qpid/framing/FieldTable.h b/cpp/include/qpid/framing/FieldTable.h
index bdcef6d7fd..ce0374d829 100644
--- a/cpp/include/qpid/framing/FieldTable.h
+++ b/cpp/include/qpid/framing/FieldTable.h
@@ -56,7 +56,7 @@ class FieldTable
typedef ValueMap::reference reference;
typedef ValueMap::value_type value_type;
- QPID_COMMON_INLINE_EXTERN FieldTable() {};
+ QPID_COMMON_EXTERN FieldTable();
QPID_COMMON_EXTERN FieldTable(const FieldTable& ft);
QPID_COMMON_EXTERN ~FieldTable();
QPID_COMMON_EXTERN FieldTable& operator=(const FieldTable& ft);
@@ -109,7 +109,7 @@ class FieldTable
QPID_COMMON_EXTERN std::pair <ValueMap::iterator, bool> insert(const ValueMap::value_type&);
QPID_COMMON_EXTERN ValueMap::iterator insert(ValueMap::iterator, const ValueMap::value_type&);
- void clear() { values.clear(); }
+ void clear();
// ### Hack Alert
@@ -117,6 +117,7 @@ class FieldTable
private:
ValueMap values;
+ mutable uint32_t cachedSize; // if = 0 then non cached size as 0 is not a legal size
QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream& out, const FieldTable& body);
};