diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-09-19 11:13:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-20 17:48:08 +0200 |
commit | afd918a81bc2dce4830bc94cbd88b9038f5715ff (patch) | |
tree | 5d6d46d4c149be04b34066f15fff470d19ec9127 /svx | |
parent | 88b72d85ef82a5a6ca019ef9b88f5389db067c83 (diff) |
introduce SfxItemSetFixed and use it in DefaultProperties
DefaultProperties::SetObjectItemSet is very hot when loading
shapes, and a large chunk of that cost is allocating the pool item
array.
So use a template class to allocate the array in-line to the class,
which means it can be allocated on-stack.
Change-Id: Ic53b41f35784726362de38fceb35f8634cddf0a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122310
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/properties/defaultproperties.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index cd6a00a0981c..fd27a9744d80 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -186,9 +186,9 @@ namespace sdr::properties const SfxPoolItem *pPoolItem; std::vector< sal_uInt16 > aPostItemChangeList; bool bDidChange(false); - std::optional<SfxItemSet> aSet; + std::optional<SfxItemSetFixed<SDRATTR_START, EE_ITEMS_END>> aSet; if (WantItemSetInItemSetChanged()) - aSet.emplace(GetSdrObject().GetObjectItemPool(), svl::Items<SDRATTR_START, EE_ITEMS_END>); + aSet.emplace(GetSdrObject().GetObjectItemPool()); // give a hint to STL_Vector aPostItemChangeList.reserve(rSet.Count()); |