summaryrefslogtreecommitdiff
path: root/include/sax/fastattribs.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-14 11:31:19 +0200
committerAndras Timar <andras.timar@collabora.com>2019-09-16 14:47:09 +0200
commit4659671f3c696a27139a4df98dc0894548169ace (patch)
tree41a527d537f1996597b48983068b3798e0bb7966 /include/sax/fastattribs.hxx
parente9c3426fbe33dbe3f267959b1e6c8ef3aff5bb5e (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> (cherry picked from commit 096b91ee15e2686d4eb7118fdb9688ba9dbc44b2) Reviewed-on: https://gerrit.libreoffice.org/78901 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'include/sax/fastattribs.hxx')
-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 f8005a65a27a..a45dcba001e3 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 );