diff options
author | Aron Budea <baron@caesar.elte.hu> | 2016-04-25 04:04:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-26 09:40:56 +0000 |
commit | f91674bd4b5022a63dc5e6a89fe9a1b832d96798 (patch) | |
tree | 82587361a5c7deac5958ef2cd83ef28756afe09a /forms/source/inc | |
parent | 6046062719f30849cd97161c6a89d27a0b0d2a20 (diff) |
tdf#60418: improve perf of opening/closing odts with form tags
Opening/closing times using "Without Frame tags" attached file from
bug report changed as follows on my system (debug build):
open: 2:06 -> 1:32
close (doc unchanged): 1:52 -> 0:18
The performance fixes in the different CXX files are independent,
eventattachermgr.cxx is related to doc close, the others to doc open.
Change-Id: I24fc4558f79b9123494a3939c0a313fcd47a067f
Reviewed-on: https://gerrit.libreoffice.org/24359
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'forms/source/inc')
-rw-r--r-- | forms/source/inc/property.hxx | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx index 0fe9750df5dd..daf86db81231 100644 --- a/forms/source/inc/property.hxx +++ b/forms/source/inc/property.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> -#include <vector> +#include <unordered_map> #include <com/sun/star/uno/XAggregation.hpp> #include <com/sun/star/beans/XPropertyState.hpp> @@ -46,40 +46,9 @@ namespace frm class PropertyInfoService { - - struct PropertyAssignment - { - OUString sName; - sal_Int32 nHandle; - - PropertyAssignment() { nHandle = -1; } - PropertyAssignment(const PropertyAssignment& _rSource) - :sName(_rSource.sName), nHandle(_rSource.nHandle) { } - PropertyAssignment(const OUString& _rName, sal_Int32 _nHandle) - :sName(_rName), nHandle(_nHandle) { } - - }; - - typedef std::vector<PropertyAssignment> PropertyMap; + typedef std::unordered_map<OUString, sal_Int32, OUStringHash> PropertyMap; static PropertyMap s_AllKnownProperties; - - // comparing two PropertyAssignment's -public: - typedef PropertyAssignment PUBLIC_SOLARIS_COMPILER_HACK; - // did not get the following compiled under with SUNPRO 5 without this - // public typedef -private: - friend struct PropertyAssignmentNameCompareLess; - typedef ::std::binary_function< PUBLIC_SOLARIS_COMPILER_HACK, PUBLIC_SOLARIS_COMPILER_HACK, sal_Bool > PropertyAssignmentNameCompareLess_Base; - struct PropertyAssignmentNameCompareLess : public PropertyAssignmentNameCompareLess_Base - { - inline bool operator() (const PUBLIC_SOLARIS_COMPILER_HACK& _rL, const PUBLIC_SOLARIS_COMPILER_HACK& _rR) const - { - return (_rL.sName.compareTo(_rR.sName) < 0); - } - }; - public: PropertyInfoService() { } |