summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-12-28 12:49:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-01 09:39:21 +0100
commit3208e69e5ff7a4d151a108d7f2af134664a26bab (patch)
treec455ed30f12a43c8335d9fcb6b819561bfdae338 /sc/inc
parent6a37bc154b80e261e6d10d383de73da6ffa1e9d9 (diff)
tdf#129228 speedup opening of xlsx file with lots of comments
by avoid some of the EqualPatternSets memcmp cost by using a hashcode, memcmp with lots of large and similar arrays ends up blowing the L1/L2 cache Takes the time from 64s to 59s for me. Change-Id: I6961aa34f4e7457a70cb75a37dfae50d5f328589 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85918 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85948
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/patattr.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 19c4df01c345..c0e7c39fa6aa 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -52,6 +52,7 @@ enum ScAutoFontColorMode
class SC_DLLPUBLIC ScPatternAttr final : public SfxSetItem
{
boost::optional<OUString> pName;
+ mutable boost::optional<size_t> mxHashCode;
ScStyleSheet* pStyle;
sal_uInt64 mnKey;
public:
@@ -143,6 +144,9 @@ public:
void SetKey(sal_uInt64 nKey);
sal_uInt64 GetKey() const;
+
+private:
+ void CalcHashCode() const;
};
#endif