summaryrefslogtreecommitdiff
path: root/include/sax
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-14 11:31:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-14 15:30:00 +0200
commit096b91ee15e2686d4eb7118fdb9688ba9dbc44b2 (patch)
tree9f533eb690bf24c1cc65ec69eba07e6b796e69a2 /include/sax
parent8aca05e934c71f8562107a0fd81a991e8c8fe0b3 (diff)
shave 10% off load time of large docx file
Change-Id: I5aacde7b6886bf47e79d055639e1b911da3be168 Reviewed-on: https://gerrit.libreoffice.org/78900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/sax')
-rw-r--r--include/sax/fastattribs.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 10ca8a2fad1f..ddbc0a5c1e2f 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -78,6 +78,11 @@ public:
virtual ~FastAttributeList() override;
void clear();
+ void reserve( sal_Int32 nNumTokens )
+ {
+ maAttributeValues.reserve(nNumTokens+1);
+ maAttributeTokens.reserve(nNumTokens);
+ }
void add( sal_Int32 nToken, const sal_Char* pValue );
void add( sal_Int32 nToken, const sal_Char* pValue, size_t nValueLength );
void add( sal_Int32 nToken, const OString& rValue );