diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-04 14:38:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-07 10:54:20 +0200 |
commit | f1ed27eed68228edbab5eb63951a602263e4c3a7 (patch) | |
tree | 3e85226dbd00ed61b7c38a080fff8ef063e75140 /include/svx | |
parent | f0c3fc59e1eefbec202e0a10553dd6581fc2cae5 (diff) |
tdf#63640 FILEOPEN/FILESAVE: particular .odt loads/saves very slow, part2
Use the existing sorting functionality in SfxItemPool and extend it to
search for NameOrIndex item in SvxUnoNameItemTable
This is a little tricky in that we are defining only a partial ordering
over the CntUnencodedStringItem (and their subclasses) items.
Partial because I can only use the part of
the item that is not randomly mutated by various code, which is why
the other fields in the subclasses are mostly out of bounds.
I had to exclude FillBitmapItem because it triggers a unit test
failure and I cannot figure out why that specific item does
not play nice with this optimisation.
After this optimisation, the load time goes from
3.6s to 2s on my machine.
Change-Id: I52d58c68db2536b69a7b0a9611a2b4c703bc4928
Reviewed-on: https://gerrit.libreoffice.org/71461
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/xbtmpit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xcolit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xflgrit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xflhtit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xlndsit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xlnedit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xlnstit.hxx | 2 |
7 files changed, 1 insertions, 13 deletions
diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx index dedff05369ec..8987aaf107a4 100644 --- a/include/svx/xbtmpit.hxx +++ b/include/svx/xbtmpit.hxx @@ -42,7 +42,7 @@ public: XFillBitmapItem( const XFillBitmapItem& rItem ); virtual bool operator==( const SfxPoolItem& rItem ) const override; - // NameOrIndex is sortable, but we are not + // no idea why, but this item does not play nice with the sorting optimisation, get failures in sd_import_tests virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override; diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx index 63d5e475ec31..df3723542516 100644 --- a/include/svx/xcolit.hxx +++ b/include/svx/xcolit.hxx @@ -47,8 +47,6 @@ public: XColorItem(const XColorItem& rItem); virtual bool operator==(const SfxPoolItem& rItem) const override; - // NameOrIndex is sortable, but we are not - virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; const Color& GetColorValue() const; diff --git a/include/svx/xflgrit.hxx b/include/svx/xflgrit.hxx index 8e931cb40ef0..159c6862dc79 100644 --- a/include/svx/xflgrit.hxx +++ b/include/svx/xflgrit.hxx @@ -42,8 +42,6 @@ public: XFillGradientItem(const XFillGradientItem& rItem); virtual bool operator==(const SfxPoolItem& rItem) const override; - // NameOrIndex is sortable, but we are not - virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx index 1f85088ad7cb..a81e7232abfa 100644 --- a/include/svx/xflhtit.hxx +++ b/include/svx/xflhtit.hxx @@ -41,8 +41,6 @@ public: XFillHatchItem(const XFillHatchItem& rItem); virtual bool operator==(const SfxPoolItem& rItem) const override; - // NameOrIndex is sortable, but we are not - virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; diff --git a/include/svx/xlndsit.hxx b/include/svx/xlndsit.hxx index 8afc71545301..a19e50608d15 100644 --- a/include/svx/xlndsit.hxx +++ b/include/svx/xlndsit.hxx @@ -42,8 +42,6 @@ public: XLineDashItem(const XLineDashItem& rItem); virtual bool operator==(const SfxPoolItem& rItem) const override; - // NameOrIndex is sortable, but we are not - virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; diff --git a/include/svx/xlnedit.hxx b/include/svx/xlnedit.hxx index 2896138a7e87..b24d4825946f 100644 --- a/include/svx/xlnedit.hxx +++ b/include/svx/xlnedit.hxx @@ -41,8 +41,6 @@ public: XLineEndItem(const XLineEndItem& rItem); virtual bool operator==(const SfxPoolItem& rItem) const override; - // NameOrIndex is sortable, but we are not - virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; diff --git a/include/svx/xlnstit.hxx b/include/svx/xlnstit.hxx index c37cfc3bdd6d..3e9c402e8bb9 100644 --- a/include/svx/xlnstit.hxx +++ b/include/svx/xlnstit.hxx @@ -41,8 +41,6 @@ public: XLineStartItem(const XLineStartItem& rItem); virtual bool operator==(const SfxPoolItem& rItem) const override; - // NameOrIndex is sortable, but we are not - virtual bool IsSortable() const override { return false; } virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; |