diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-20 08:32:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-20 18:18:20 +0200 |
commit | 003d11f410b7e515981b3efbd65d936d94d87121 (patch) | |
tree | d15fffce95dfc4b115b53cfb3b6924a26a506231 /sc/inc/attrib.hxx | |
parent | a0d14926ab3d5e84cefe2b349c451edf6666a392 (diff) |
tdf#81765 slow loading of .ods with >1000 of conditional formats
This takes the loaing time from 1m38 to 15s.
Speed up finding existing pool items in the pool by storing a
sorted_vector, sorted by a compare operator on the item.
memcmp is faster than operator< on std::vector because operator< seems
to be trying to use some kind of lexicographical compare
Change-Id: Id72527106d604adb8cd2d158bb42f89e2b16a85d
Reviewed-on: https://gerrit.libreoffice.org/71009
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/attrib.hxx')
-rw-r--r-- | sc/inc/attrib.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index 9e4a556080e4..e03d1a223d66 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -269,6 +269,8 @@ public: virtual ~ScCondFormatItem() override; virtual bool operator==(const SfxPoolItem& rCmp ) const override; + virtual bool operator<(const SfxPoolItem& rCmp) const override; + virtual bool IsSortable() const override { return true; } virtual ScCondFormatItem* Clone( SfxItemPool* = nullptr ) const override; const std::vector<sal_uInt32>& GetCondFormatData() const { return maIndex;} |