diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-20 09:41:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-20 10:51:12 +0200 |
commit | ea4f3099d6e0cf30d80caa8b2121c7a358f80fdd (patch) | |
tree | faa57b53de6b36eecca1608c8e9fa149f134ad22 /editeng/source/misc | |
parent | db123abade41a54d34add4fae46b769cd863de7f (diff) |
tdf#109158 improve load time of autocorrect XML file
Before, it seems to be doing a lot of unnecessary work because, by default,
startFastElement will call startUnknownElement, which constructs various objects, etc.
It seems to me that if the class already implements createFastChildContext,
it is already using XFastParser, and so it should implement startFastElement to avoid that work.
By avoiding going down the startUnknownElement path, reduces load time from
1.7s to 1.4s
Change-Id: Ifd745cf2cc22a8cb988a5668332cf6e70bb996da
Reviewed-on: https://gerrit.libreoffice.org/79269
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/misc')
-rw-r--r-- | editeng/source/misc/SvXMLAutoCorrectImport.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.hxx b/editeng/source/misc/SvXMLAutoCorrectImport.hxx index 34ec61ed323d..f61cd036b526 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.hxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.hxx @@ -56,6 +56,7 @@ public: virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext( sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; + virtual void SAL_CALL startFastElement( sal_Int32 /*Element*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*Attribs*/ ) override {} virtual ~SvXMLWordListContext() override; }; @@ -65,6 +66,7 @@ class SvXMLWordContext : public SvXMLImportContext public: SvXMLWordContext ( SvXMLAutoCorrectImport& rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); + virtual void SAL_CALL startFastElement( sal_Int32 /*Element*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*Attribs*/ ) override {} virtual ~SvXMLWordContext() override; }; |