diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2012-03-05 19:12:43 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2012-03-05 19:12:43 +0000 |
| commit | 822e4b0752fbff6284129f8bd85e529fc92bb3fa (patch) | |
| tree | 057775b6cfa6b6607b768f264164e84ec3b1dda2 /qpid/cpp/include | |
| parent | 91361618c09bc49e7fdf0a0909ee3d6df8e7d495 (diff) | |
| download | qpid-python-822e4b0752fbff6284129f8bd85e529fc92bb3fa.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@1297184 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include')
| -rw-r--r-- | qpid/cpp/include/qpid/framing/FieldTable.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/cpp/include/qpid/framing/FieldTable.h b/qpid/cpp/include/qpid/framing/FieldTable.h index bdcef6d7fd..ce0374d829 100644 --- a/qpid/cpp/include/qpid/framing/FieldTable.h +++ b/qpid/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); }; |
